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

NAME

6       pmInDomStr, pmInDomStr_r - convert a performance metric instance domain
7       identifier into a string
8

C SYNOPSIS

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

DESCRIPTION

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 as follows;
29
30            typedef struct {
31                int             pad:2;
32                unsigned int    domain:8;        /* the administrative PMD */
33                unsigned int    serial:22;       /* unique within PMD */
34            } __pmInDom_int;
35
36       pmInDomStr returns a string with each of the  domain  and  serial  sub‐
37       fields appearing as decimal numbers, separated by periods.
38
39       The string value returned by pmInDomStr is held in a single static buf‐
40       fer, so the returned value is only valid until the next call  to  pmIn‐
41       DomStr.
42

NOTES

44       pmInDomStr  returns  a  pointer  to  a  static  buffer and hence is not
45       thread-safe.   Multi-threaded  applications  should  use   pmInDomStr_r
46       instead.
47

PCP ENVIRONMENT

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

SEE ALSO

57       PMAPI(3), pmGetConfig(3), pmIDStr(3), pmLookupDesc(3), pcp.conf(5)  and
58       pcp.env(5).
59
60
61
62Performance Co-Pilot                  PCP                        PMINDOMSTR(3)
Impressum