Given a list in namelist containing numpmid full pathnames for
performance metrics from a Performance Metrics Name Space (PMNS),
pmLookupName returns the list of associated Performance Metric
Identifiers (PMIDs) via pmidlist.
The result from pmLookupName depends on the presence of any lookup
failures, their severity and the number of metrics being looked up.
1. If there are no lookup failures, the return value will be
2. If a fatal error is encountered, the return value will be less
than 0. For example PM_ERR_TOOSMALL, PM_ERR_NOPMNS or
3. If numpmid is greater than one and non-fatal error(s) are
encountered, the return value is the number of metric names that
have successfully been looked up (greater than or equal to zero
and less than or equal to numpmid).
4. If numpmid is one and a non-fatal error is encountered, the
return value is the error code (less than zero).
When errors are encountered, any metrics that cannot be looked up
result in the corresponding element of pmidlist being set to
The slightly convoluted error protocol allows bulk lookups, then
probing for more error details in the case of a specific failure, as
shown in the EXAMPLES section below.
Note that the error protocol guarantees there is a 1:1 relationship
between the elements of namelist and pmidlist, hence both lists
contain exactly numpmid elements. For this reason, the caller is
expected to have pre-allocated a suitably sized array for pmidlist.
PM_ERR_TOOSMALLnumpmid must be at least 1
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 pmLookupName
must be made after the creation of a context (see
PM_ERR_NAMEnamelist does not correspond to a valid metric name in the
PM_ERR_NONLEAFnamelist refers to a node in the PMNS but it was not a leaf
Other diagnostics are for protocol failures when accessing the
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
firstname.lastname@example.org. This page was obtained from the project's upstream
Git repository ⟨https://github.com/performancecopilot/pcp.git⟩ on
2020-06-09. (At that time, the date of the most recent commit that
was found in the repository was 2020-06-09.) 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
Performance Co-Pilot PCP PMLOOKUPNAME(3)