NAME | C SYNOPSIS | DESCRIPTION | SEE ALSO | DIAGNOSTICS | COLOPHON

PMNAMEID(3)               Library Functions Manual               PMNAMEID(3)

NAME         top

       pmNameID - translate a PMID to a performance metric name

C SYNOPSIS         top

       #include <pcp/pmapi.h>

       int pmNameID(pmID pmid, char **name);

       cc ... -lpcp

DESCRIPTION         top

       Given 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.

       name is a null-byte terminated string, allocated by pmNameID using
       malloc(3) and it is the caller's responsibility to call free(3) to
       release the storage when the value is no longer required.

       In the absence of errors, pmNameID returns zero.

SEE ALSO         top

       PMAPI(3), pmGetChildren(3), pmGetChildrenStatus(3), pmGetConfig(3),
       pmLoadASCIINameSpace(3), pmLoadNameSpace(3), pmLookupName(3),
       pmNameAll(3), pmNewContext(3), pcp.conf(5), pcp.env(5) and pmns(5).

DIAGNOSTICS         top

       PM_ERR_NOPMNS
              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)).

       PM_ERR_PMID
              pmid does not correspond to a defined PMID in the PMNS.

       PM_ERR_*
              Other diagnostics are for protocol failures when accessing the
              distributed PMNS.

COLOPHON         top

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at ⟨http://www.pcp.io/⟩.
       If you have a bug report for this manual page, send it to
       pcp@oss.sgi.com.  This page was obtained from the project's upstream
       Git repository ⟨git://git.pcp.io/pcp⟩ on 2017-05-03.  If you discover
       any rendering problems in this HTML version of the page, or you
       believe there is a better or more up-to-date source for the page, or
       you have corrections or improvements to the information in this
       COLOPHON (which is not part of the original manual page), send a mail
       to man-pages@man7.org

Performance Co-Pilot                 PCP                         PMNAMEID(3)

Pages that refer to this page: pmapi(3)pmdaname(3)pmgetchildren(3)pmgetchildrenstatus(3)pmlookupname(3)pmnameall(3)