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

NAME

6       pmIDStr,  pmIDStr_r  -  convert  a performance metric identifier into a
7       string
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       const char *pmIDStr(pmID pmid);
13       char *pmIDStr_r(pmID pmid, char *buf, int buflen);
14
15       cc ... -lpcp
16

DESCRIPTION

18       For use in error and diagnostic  messages,  pmIDStr  returns  a  `human
19       readable'  version  of  the  specified  Performance  Metric  Identifier
20       (PMID).  The pmIDStr_r function does the same, but stores the result in
21       a user-supplied buffer buf of length buflen, which should have room for
22       at least 20 bytes.
23
24       Internally, a PMID is encoded with three fields:  domain,  cluster  and
25       item.   pmIDStr  returns  a string with each of the fields appearing as
26       decimal numbers, separated by periods.
27
28       The string value result from pmIDStr is held in a single static buffer,
29       so the returned value is only valid until the next call to pmIDStr.
30

NOTES

32       pmIDStr  returns  a pointer to a static buffer and hence is not thread-
33       safe.  Multi-threaded applications should use pmIDStr_r instead.
34

PCP ENVIRONMENT

36       Environment variables with the prefix PCP_ are used to parameterize the
37       file  and  directory names used by PCP.  On each installation, the file
38       /etc/pcp.conf contains the  local  values  for  these  variables.   The
39       $PCP_CONF  variable may be used to specify an alternative configuration
40       file, as described in pcp.conf(5).  Values for these variables  may  be
41       obtained programmatically using the pmGetConfig(3) function.
42

SEE ALSO

44       PMAPI(3),  pmGetConfig(3),  pmInDomStr(3),  pmTypeStr(3),  pmSemStr(3),
45       pmUnitsStr(3), pmLookupDesc(3), pcp.conf(5) and pcp.env(5).
46
47
48
49Performance Co-Pilot                  PCP                           PMIDSTR(3)
Impressum