---
name: "pmeventflagsstr"
section: "3"
platform: "linux"
package: "libpcp3-dev"
version: "4.3.2+really4.3.1-0.1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/pmEventFlagsStr"
---

# pmeventflagsstr(3)

convert an event record flags value into a string

Part of [pmEventFlagsStr(3)](/pmEventFlagsStr/3.md).

## NAME

**pmEventFlagsStr**, **pmEventFlagsStr\_r** - convert an event record flags value into a string

## C SYNOPSIS

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

**const char \*pmEventFlagsStr(int** *flags***);**\
 **char \*pmEventFlagsStr\_r(int** *flags***, char \****buf***, int** *buflen***);**

**cc ... -lpcp**

## DESCRIPTION

For use in error and diagnostic messages, **pmEventFlagsStr** returns a \`human readable' version of the value *flags*, assuming this to be the **er\_flags** field of a **pmEventRecord** or **pmEventHighResRecord**. The **pmEventFlagsStr\_r** function does the same, but stores the result in a user-supplied buffer *buf* of length *buflen*, which should have room for at least 64 bytes.

The string value result from **pmEventFlagsStr** is held in a single static buffer, so the returned value is only valid until the next call to **pmEventFlagsStr**.

## NOTES

**pmEventFlagsStr** returns a pointer to a static buffer and hence is not thread-safe. Multi-threaded applications should use **pmEventFlagsStr\_r** instead.

## SEE ALSO

[**PMAPI**(3)](/PMAPI/3.md) and [**pmdaEventAddRecord**(3)](/pmdaEventAddRecord/3.md).
