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

NAME

6       pmNameAll,  pmRequestNameAll,  pmReceiveNameAll - translate a PMID to a
7       set of performance metric names
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       int pmNameAll(pmID pmid, char ***nameset)
13       int pmRequestNameAll(int ctx, pmID pmid)
14       int pmReceiveNameAll(int ctx, char ***nameset)
15
16       cc ... -lpcp
17

DESCRIPTION

19       Given a Performance Metric ID (PMID) via pmid, pmNameAll will determine
20       all  the corresponding metric names, if any, in the Performance Metrics
21       Name Space (PMNS), and return these via nameset.
22
23       The resulting list of pointers nameset and  the  values  (the  relative
24       names)  that  the  pointers  reference  will  have  been  allocated  by
25       pmNameAll with a single call to malloc(3C), and it is the  responsibil‐
26       ity  of the pmNameAll caller to free(nameset) to release the space when
27       it is no longer required.
28
29       In the absence of errors, pmNameAll returns  the  number  of  names  in
30       nameset.
31
32       For many examples of a PMNS, there will be a 1:1 mapping between a name
33       and a PMID, and  under  these  circumstances,  pmNameID(3)  provides  a
34       slightly simpler interface in the absence of duplicate names for a par‐
35       ticular PMID.
36
37       pmRequestNameAll and pmReceiveNameAll are used  by  applications  which
38       must   communicate  with the PMCD asynchronously.  These functions take
39       explict context handle ctx which must refer to  a  host  context  (i.e.
40       created  by  passing PM_CONTEXT_HOST to pmNewContext). pmRequestNameAll
41       sends request to PMCD to return names of all metrics  matching  a  PMID
42       and  returns  without  waiting for the response, pmReceiveNameAll reads
43       reply from PMCD. It is the responsibility of the  application  to  make
44       sure the data are ready before calling pmReceiveNameAll to avoid block‐
45       ing.
46

SEE ALSO

48       PMAPI(3),  pmGetChildren(3),  pmGetChildrenStatus(3),   pmGetConfig(3),
49       pmLoadASCIINameSpace(3),      pmLoadNameSpace(3),      pmLookupName(3),
50       pmNameID(3), pmNewContext(3), pcp.conf(4), pcp.env(4) and pmns(4).
51

DIAGNOSTICS

53       PM_ERR_NOPMNS
54              Failed to access a PMNS for operation.  Note that if the  appli‐
55              cation  hasn't  a  priori called pmLoadNameSpace(3) and wants to
56              use the distributed PMNS, then a call to pmNameAll must be  made
57              after the creation of a context (see pmNewContext(3)).
58
59       PM_ERR_PMID
60              pmid does not correspond to a defined PMID in the PMNS.
61
62       PM_ERR_*
63              Other  diagnostics  are for protocol failures when accessing the
64              distributed PMNS.
65
66       PM_ERR_CTXBUSY
67              Context is currently in use by another asynchronous call.
68
69
70
71Performance Co-Pilot                  SGI                         PMNAMEALL(3)
Impressum