1PMGETINDOM(3) Library Functions Manual PMGETINDOM(3)
2
3
4
6 pmGetInDom - get instance identifiers for a performance metrics
7 instance domain
8
10 #include <pcp/pmapi.h>
11
12 int pmGetInDom(pmInDom indom, int **instlist, char ***namelist);
13
14 cc ... -lpcp
15
17 In the current Performance Metrics Application Programming Interface
18 (PMAPI) context, locate the description of the instance domain indom,
19 and return via instlist the internal instance identifiers for all
20 instances, and via namelist the full external identifiers for all
21 instances. The number of instances found is returned as the function
22 value (else less than zero to indicate an error).
23
24 The value for the instance domain indom is typically extracted from a
25 pmDesc structure, following a call to pmLookupDesc(3) for a particular
26 performance metric.
27
28 The resulting lists of instance identifiers (instlist and namelist),
29 and the names that the elements of namelist point to, will have been
30 allocated by pmGetInDom with two calls to malloc(3), and it is the
31 responsibility of the caller to free(instlist) and free(namelist) to
32 release the space when it is no longer required.
33
34 When the result of pmGetInDom is less than one, both instlist and
35 namelist are undefined (no space will have been allocated, and so call‐
36 ing free(3) is a singularly bad idea).
37
39 Environment variables with the prefix PCP_ are used to parameterize the
40 file and directory names used by PCP. On each installation, the file
41 /etc/pcp.conf contains the local values for these variables. The
42 $PCP_CONF variable may be used to specify an alternative configuration
43 file, as described in pcp.conf(5). Values for these variables may be
44 obtained programmatically using the pmGetConfig(3) function.
45
47 PMAPI(3), pmGetConfig(3), pmGetInDomArchive(3), pmLookupDesc(3),
48 pmLookupInDom(3), pmNameInDom(3), pcp.conf(5) and pcp.env(5).
49
51 PM_ERR_INDOM
52 indom is not a valid instance domain identifier
53
54
55
56Performance Co-Pilot PCP PMGETINDOM(3)