pmNameID (3) - Linux Man Pages
pmNameID: translate a PMID to a performance metric name
NAMEpmNameID - translate a PMID to a performance metric name
C SYNOPSIS#include <pcp/pmapi.h>
int pmNameID(pmID pmid, char **name);
DESCRIPTIONGiven a Performance Metric Identifier (PMID) via pmid, pmNameID will determine the corresponding metric name, if any, in the Performance Metrics Name Space (PMNS), and return this via name.
If the PMNS contains multiple names associated with the requested PMID, one of these will be returned via name, but there is no way to determine which of the duplicate names this will be. See pmNameAll(3) if all of the corresponding names are required.
As of Version 3.10.3 of PCP, duplicate names for the same PMID are allowed in the PMNS, so using pmNameAll(3) is recommended over pmnameID.
- Failed to access a PMNS for operation. Note that if the application hasn't a priori called pmLoadNameSpace(3) and wants to use the distributed PMNS, then a call to pmNameID must be made after the creation of a context (see pmNewContext(3)).
- pmid does not correspond to a defined PMID in the PMNS.
Other diagnostics are for protocol failures when
accessing the distributed PMNS.