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

# \_\_pmCheckAttribute(3)

check value for a client connection attribute

## NAME

**\_\_pmCheckAttribute** - check value for a client connection attribute

## C SYNOPSIS

**#include "pmapi.h"**\
 **#include "libpcp.h"**

**int \_\_pmCheckAttribute(\_\_pmAttrKey** *attr***,** **const char \****value***);**

**cc ... -lpcp**

## CAVEAT

This documentation is intended for internal Performance Co-Pilot (PCP) developer use.

These interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases, and they may not work, or may provide different semantics at some point in the future.

## DESCRIPTION

Connection attributes are exchanged between [**pmcd**(1)](/pmcd/1.md) and PCP client tools at the start of the protocol exchange. They provide optional information relating to an individual connection, such as the name of a specific container that is under analysis by the client.

**\_\_pmCheckAttribute** verifies that the given attribute *attr* follows the expected syntax for that type of attribute. This assists with the prevention of malicious content being accepted by **pmcd** as these attributes may subsequently be used in parsers or carried into structured output such as JSON format.

## RETURN VALUES

When presented with an unrecognised attribute or an invalid *value* for the specified attribute, **\_\_pmCheckAttribute** returns a negative value suitable for reporting with [**pmErrStr**(3)](/pmErrStr/3.md). Otherwise the return value is zero indicating success.

## SEE ALSO

[**pmdbg**(1)](/pmdbg/1.md), [**PMAPI**(3)](/PMAPI/3.md) and [**pmErrStr**(3)](/pmErrStr/3.md).
