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

NAME

6       pmNameID - translate a PMID to a performance metric name
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       int pmNameID(pmID pmid, char **name);
12
13       cc ... -lpcp
14

DESCRIPTION

16       Given  a  Performance  Metric Identifier (PMID) via pmid, pmNameID will
17       determine the corresponding metric name, if  any,  in  the  Performance
18       Metrics Name Space (PMNS), and return this via name.
19
20       If the PMNS contains multiple names associated with the requested PMID,
21       one of these will be returned via name, but there is no way  to  deter‐
22       mine  which  of  the duplicate names this will be.  See pmNameAll(3) if
23       all of the corresponding names are required.
24
25       As of Version 3.10.3 of PCP, duplicate names  for  the  same  PMID  are
26       allowed  in  the  PMNS,  so  using  pmNameAll(3)  is  recommended  over
27       pmnameID.
28
29       name is a null-byte terminated string, allocated by pmNameID using mal‐
30       loc(3) and it is the caller's responsibility to call free(3) to release
31       the storage when the value is no longer required.
32
33       In the absence of errors, pmNameID returns zero.
34

SEE ALSO

36       PMAPI(3),  pmGetChildren(3),  pmGetChildrenStatus(3),   pmGetConfig(3),
37       pmLoadASCIINameSpace(3),      pmLoadNameSpace(3),      pmLookupName(3),
38       pmNameAll(3), pmNewContext(3), pcp.conf(5), pcp.env(5) and pmns(5).
39

DIAGNOSTICS

41       PM_ERR_NOPMNS
42              Failed to access a PMNS for operation.  Note that if the  appli‐
43              cation  hasn't  a  priori called pmLoadNameSpace(3) and wants to
44              use the distributed PMNS, then a call to pmNameID must  be  made
45              after the creation of a context (see pmNewContext(3)).
46
47       PM_ERR_PMID
48              pmid does not correspond to a defined PMID in the PMNS.
49
50       PM_ERR_*
51              Other  diagnostics  are for protocol failures when accessing the
52              distributed PMNS.
53
54
55
56Performance Co-Pilot                  PCP                          PMNAMEID(3)
Impressum