PMNAMEALL(3) | Library Functions Manual | PMNAMEALL(3) |
pmNameAll - translate a PMID to a set of performance metric names
#include <pcp/pmapi.h>
int pmNameAll(pmID pmid, char ***nameset);
cc ... -lpcp
Given a Performance Metric Identifier (PMID) via pmid, pmNameAll will determine all the corresponding metric names, if any, in the Performance Metrics Name Space (PMNS), and return these via nameset.
The resulting list of pointers nameset and the values (the relative names) that the pointers reference will have been allocated by pmNameAll with a single call to malloc(3), and it is the responsibility of the pmNameAll caller to use free(nameset) to release the space when it is no longer required.
In the absence of errors, pmNameAll returns the number of names in nameset.
For many examples of a PMNS, there will be a 1:1 mapping between a name and a PMID, and under these circumstances, pmNameID(3) provides a slightly simpler interface in the absence of duplicate names for a particular PMID.
PMAPI(3), pmGetChildren(3), pmGetChildrenStatus(3), pmGetConfig(3), pmLoadASCIINameSpace(3), pmLoadNameSpace(3), pmLookupName(3), pmNameID(3), pmNewContext(3), pcp.conf(5), pcp.env(5) and pmns(5).
PCP | Performance Co-Pilot |