1PMINDOMSTR(3) Library Functions Manual PMINDOMSTR(3)
2
3
4
6 pmInDomStr, pmInDomStr_r - convert a performance metric instance domain
7 identifier into a string
8
10 #include <pcp/pmapi.h>
11
12 const char *pmInDomStr(pmInDom indom);
13 char *pmInDomStr_r(pmInDom indom, char *buf, int buflen);
14
15 cc ... -lpcp
16
18 For use in error and diagnostic messages, pmInDomStr return a 'human
19 readable' version of the specified instance domain identifier. The
20 pmInDomStr_r function does the same, but stores the result in a user-
21 supplied buffer buf of length buflen, which should have room for at
22 least 20 bytes.
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 Internally, an instance domain identifier is encoded with two fields:
29 domain and serial.
30
31 pmInDomStr returns a string with each of the fields appearing as deci‐
32 mal numbers, separated by periods.
33
34 The string value returned by pmInDomStr is held in a single static buf‐
35 fer, so the returned value is only valid until the next call to pmIn‐
36 DomStr.
37
39 pmInDomStr returns a pointer to a static buffer and hence is not
40 thread-safe. Multi-threaded applications should use pmInDomStr_r in‐
41 stead.
42
44 Environment variables with the prefix PCP_ are used to parameterize the
45 file and directory names used by PCP. On each installation, the file
46 /etc/pcp.conf contains the local values for these variables. The
47 $PCP_CONF variable may be used to specify an alternative configuration
48 file, as described in pcp.conf(5). Values for these variables may be
49 obtained programmatically using the pmGetConfig(3) function.
50
52 PMAPI(3), pmGetConfig(3), pmIDStr(3), pmTypeStr(3), pmSemStr(3), pmU‐
53 nitsStr(3), pmLookupDesc(3), pcp.conf(5) and pcp.env(5).
54
55
56
57Performance Co-Pilot PCP PMINDOMSTR(3)