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

# pmNotifyErr(3)

standard handling of error messages

## NAME

**pmNotifyErr**, **pmSyslog** - standard handling of error messages

## C SYNOPSIS

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

**void pmNotifyErr(int** *priority***, const char \****message***, ...);**\
 **void pmSyslog(int** *onoff***);**

**cc ... -lpcp**

## DESCRIPTION

These routines provide standard handling for error messages from within the internals of Performance Co-Pilot (PCP) daemons and Performance Metric Domain Agents (PMDAs).

**pmNotifyErr** is a [**printf**(3)](/printf/3.md) style function that will format *message* (and any subsequent arguments) with a prefix that includes the current date and time from [**ctime**(3)](/ctime/3.md), the name of the application from [**pmGetProgname**(3)](/pmGetProgname/3.md), the process's id from [**getpid**(2)](/getpid/2.md) and the *priority*.

*priority* should be one of the level **LOG\_** macros defined for [**syslog**(3)](/syslog/3.md). Most typically this would be **LOG\_INFO**, **LOG\_WARNING** or **LOG\_ERR**.

**pmNotifyErr** writes to standard error, which for daemons and PMDAs has most likely been redirected to a log file using [**pmOpenLog**(3)](/pmOpenLog/3.md). Additionally *message* (and any subsequent arguments) may be sent forwarded to [**syslog**(3)](/syslog/3.md) if **pmSyslog** has previously been called with *onoff* having a non-zero value.

Forwarding to [**syslog**(3)](/syslog/3.md) can be disabled at any time by calling **pmSyslog** with *onoff* having a zero value, and this is the starting state for each PCP application.

In the style of [**syslog**(3)](/syslog/3.md) *message* need not include a terminating newline character (one will be added if required).

## SEE ALSO

[**getpid**(2)](/getpid/2.md), [**ctime**(3)](/ctime/3.md), [**PMAPI**(3)](/PMAPI/3.md), [**pmGetProgname**(3)](/pmGetProgname/3.md), [**pmOpenLog**(3)](/pmOpenLog/3.md), [**printf**(3)](/printf/3.md) and [**syslog**(3)](/syslog/3.md).
