1PMNAMEALL(3) Library Functions Manual PMNAMEALL(3)
2
3
4
6 pmNameAll - translate a PMID to a set of performance metric names
7
9 #include <pcp/pmapi.h>
10
11 int pmNameAll(pmID pmid, char ***nameset);
12
13 cc ... -lpcp
14
16 Given a Performance Metric Identifier (PMID) via pmid, pmNameAll will
17 determine all the corresponding metric names, if any, in the Perfor‐
18 mance Metrics Name Space (PMNS), and return these via nameset.
19
20 The resulting list of pointers nameset and the values (the relative
21 names) that the pointers reference will have been allocated by pm‐
22 NameAll with a single call to malloc(3), and it is the responsibility
23 of the pmNameAll caller to use free(nameset) to release the space when
24 it is no longer required.
25
26 In the absence of errors, pmNameAll returns the number of names in
27 nameset.
28
29 For many examples of a PMNS, there will be a 1:1 mapping between a name
30 and a PMID, and under these circumstances, pmNameID(3) provides a
31 slightly simpler interface in the absence of duplicate names for a par‐
32 ticular PMID.
33
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 pmNameAll 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
49 PMAPI(3), pmGetChildren(3), pmGetChildrenStatus(3), pmGetConfig(3), pm‐
50 LoadASCIINameSpace(3), pmLoadNameSpace(3), pmLookupName(3), pm‐
51 NameID(3), pmNewContext(3), pcp.conf(5), pcp.env(5) and PMNS(5).
52
53
54
55Performance Co-Pilot PCP PMNAMEALL(3)