1PMGETINDOMARCHIVE(3)       Library Functions Manual       PMGETINDOMARCHIVE(3)
2
3
4

NAME

6       pmGetInDomArchive  - get instance identifiers for a performance metrics
7       instance domain
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       int pmGetInDomArchive(pmInDom indom, int **instlist, char ***namelist);
13
14       cc ... -lpcp
15

DESCRIPTION

17       Provided the current Performance Metrics Application Programming Inter‐
18       face  (PMAPI)  context  is  associated  with an archive log, pmGetInDo‐
19       mArchive will scan the union of all the instance  domain  metadata  for
20       the  instance  domain  indom,  and  return  via  instlist  the internal
21       instance identifiers for all  instances,  and  via  namelist  the  full
22       external identifiers for all instances.
23
24       This routine is a specialized version of the more general PMAPI routine
25       pmGetInDom.
26
27       The number of instances found is returned as the function  value  (else
28       less than zero to indicate an error).
29
30       The  value  for the instance domain indom is typically extracted from a
31       pmDesc structure, following a call to pmLookupDesc(3) for a  particular
32       performance metric.
33
34       The  resulting  lists  of instance identifiers (instlist and namelist),
35       and the names that the elements of namelist point to,  will  have  been
36       allocated  by  pmGetInDomArchive with two calls to malloc(3), and it is
37       the responsibility of the caller to free(instlist)  and  free(namelist)
38       to release the space when it is no longer required.
39
40       When  the  result  of pmGetInDomArchive is less than one, both instlist
41       and namelist are undefined (no space will have been allocated,  and  so
42       calling free(3) is a singularly bad idea).
43

PCP ENVIRONMENT

45       Environment variables with the prefix PCP_ are used to parameterize the
46       file and directory names used by PCP.  On each installation,  the  file
47       /etc/pcp.conf  contains  the  local  values  for  these variables.  The
48       $PCP_CONF variable may be used to specify an alternative  configuration
49       file,  as  described in pcp.conf(5).  Values for these variables may be
50       obtained programmatically using the pmGetConfig(3) function.
51

SEE ALSO

53       PMAPI(3), pmGetConfig(3), pmGetInDom(3), pmLookupDesc(3), pmLookupInDo‐
54       mArchive(3), pmNameInDomArchive(3), pcp.conf(5) and pcp.env(5).
55

DIAGNOSTICS

57       PM_ERR_NOTARCHIVE
58              the current PMAPI context is not associated with an archive log
59
60       PM_ERR_INDOM_LOG
61              indom  is  not  a defined instance domain identifier for the ar‐
62              chive log
63
64
65
66Performance Co-Pilot                  PCP                 PMGETINDOMARCHIVE(3)
Impressum