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

NAME

6       pmNameID, pmRequestNameID, pmReceiveNameID - translate a PMID to a per‐
7       formance metric name
8

C SYNOPSIS

10       #include <pcp/pmapi.h>
11
12       int pmNameID(pmID pmid, char **name)
13       int pmRequestNameID(int ctx, pmID pmid)
14       int pmRecieveNameID(int ctx, char **name)
15
16       cc ... -lpcp
17

DESCRIPTION

19       Given a Performance Metric ID (PMID) via pmid, pmNameID will  determine
20       the  corresponding metric name, if any, in the Performance Metrics Name
21       Space (PMNS), and return this via name.
22
23       If the PMNS contains multiple names associated with the requested PMID,
24       one  of  these will be returned via name, but there is no way to deter‐
25       mine which of the duplicate names this will be.   See  pmNameAll(3)  if
26       all of the corresponding names are required.
27
28       name is a null-byte terminated string, allocated by pmNameID using mal‐
29       loc(3C) and it is the  caller's  responsibility  to  call  free(3C)  to
30       release the storage when the value is no longer required.
31
32       In the absence of errors, pmNameID returns zero.
33
34       pmRequestNameID and pmReceiveNameID are used by applications which must
35       communicate with the PMCD asynchronously.  These functions take explict
36       context  handle ctx which must refer to a host context (i.e. creared by
37       passing PM_CONTEXT_HOST to pmNewContext). pmRequestNameID sends request
38       to  PMCD to translate PMID to a metric name and returns without waiting
39       for the response, pmReceiveNameID reads reply  from  PMCD.  It  is  the
40       responsibility  of  the  application  to  make  sure the data are ready
41       before calling pmReceiveNameID to avoid blocking.
42

SEE ALSO

44       PMAPI(3),  pmGetChildren(3),  pmGetChildrenStatus(3),   pmGetConfig(3),
45       pmLoadASCIINameSpace(3),      pmLoadNameSpace(3),      pmLookupName(3),
46       pmNameAll(3), pmNewContext(3), pcp.conf(4), pcp.env(4) and pmns(4).
47

DIAGNOSTICS

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