---
name: "pmNameAll"
section: "3"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pmNameAll"
---

# pmNameAll(3)

translate a PMID to a set of performance metric names

## NAME

**pmNameAll** - translate a PMID to a set of performance metric names

## C SYNOPSIS

**#include \<pcp/pmapi.h\>**

**int pmNameAll(pmID** *pmid***, char \*\*\****nameset***);**

**cc ... -lpcp**

## DESCRIPTION

Given a Performance Metric Identifier (PMID) via *pmid*, **pmNameAll** will determine all the corresponding metric names, if any, in the Performance Metrics Name Space (PMNS), and return these via *nameset*.

The resulting list of pointers *nameset* **and** the values (the relative names) that the pointers reference will have been allocated by **pmNameAll** with a single call to [**malloc**(3)](/malloc/3.md), and it is the responsibility of the **pmNameAll** caller to use *free(nameset)* to release the space when it is no longer required.

In the absence of errors, **pmNameAll** returns the number of names in *nameset*.

For many examples of a PMNS, there will be a 1:1 mapping between a name and a PMID, and under these circumstances, [**pmNameID**(3)](/pmNameID/3.md) provides a slightly simpler interface in the absence of duplicate names for a particular PMID.

## DIAGNOSTICS

- **PM\_ERR\_NOPMNS**

  Failed to access a PMNS for operation. Note that if the application hasn't a priori called [**pmLoadNameSpace**(3)](/pmLoadNameSpace/3.md) and wants to use the distributed PMNS, then a call to **pmNameAll** must be made after the creation of a context (see [**pmNewContext**(3)](/pmNewContext/3.md)).

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

## SEE ALSO

[**PMAPI**(3)](/PMAPI/3.md), [**pmGetChildren**(3)](/pmGetChildren/3.md), [**pmGetChildrenStatus**(3)](/pmGetChildrenStatus/3.md), [**pmGetConfig**(3)](/pmGetConfig/3.md), [**pmLoadASCIINameSpace**(3)](/pmLoadASCIINameSpace/3.md), [**pmLoadNameSpace**(3)](/pmLoadNameSpace/3.md), [**pmLookupName**(3)](/pmLookupName/3.md), [**pmNameID**(3)](/pmNameID/3.md), [**pmNewContext**(3)](/pmNewContext/3.md), [**pcp.conf**(5)](/pcp.conf/5.md), [**pcp.env**(5)](/pcp.env/5.md) and [**PMNS**(5)](/PMNS/5.md).
