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  al‐
26       lowed in the PMNS, so using pmNameAll(3) is recommended over pmnameID.
27
28       name is a null-byte terminated string, allocated by pmNameID using mal‐
29       loc(3) and it is the caller's responsibility to call free(3) to release
30       the storage when the value is no longer required.
31
32       In the absence of errors, pmNameID returns zero.
33

DIAGNOSTICS

35       PM_ERR_NOPMNS
36              Failed  to access a PMNS for operation.  Note that if the appli‐
37              cation hasn't a priori called pmLoadNameSpace(3)  and  wants  to
38              use  the  distributed PMNS, then a call to pmNameID must be made
39              after the creation of a context (see pmNewContext(3)).
40
41       PM_ERR_PMID
42              pmid does not correspond to a defined PMID in the PMNS.
43
44       PM_ERR_*
45              Other diagnostics are for protocol failures when  accessing  the
46              distributed PMNS.
47

SEE ALSO

49       PMAPI(3), pmGetChildren(3), pmGetChildrenStatus(3), pmGetConfig(3), pm‐
50       LoadASCIINameSpace(3),   pmLoadNameSpace(3),    pmLookupName(3),    pm‐
51       NameAll(3), pmNewContext(3), pcp.conf(5), pcp.env(5) and PMNS(5).
52
53
54
55Performance Co-Pilot                  PCP                          PMNAMEID(3)
Impressum