1PMGETINDOM(3) Library Functions Manual PMGETINDOM(3)
2
3
4
6 pmGetInDom - get instance identifiers for a performance metrics in‐
7 stance 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 in‐
20 stances, and via namelist the full external identifiers for all in‐
21 stances. 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 re‐
31 sponsibility of the caller to free(instlist) and free(namelist) to re‐
32 lease 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 PM_ERR_INDOM
40 indom is not a valid instance domain identifier
41
43 Environment variables with the prefix PCP_ are used to parameterize the
44 file and directory names used by PCP. On each installation, the file
45 /etc/pcp.conf contains the local values for these variables. The
46 $PCP_CONF variable may be used to specify an alternative configuration
47 file, as described in pcp.conf(5). Values for these variables may be
48 obtained programmatically using the pmGetConfig(3) function.
49
51 PMAPI(3), pmGetConfig(3), pmGetInDomArchive(3), pmLookupDesc(3), pm‐
52 LookupInDom(3), pmNameInDom(3), pcp.conf(5) and pcp.env(5).
53
54
55
56Performance Co-Pilot PCP PMGETINDOM(3)