1PMNOTIFYERR(3)             Library Functions Manual             PMNOTIFYERR(3)
2
3
4

NAME

6       pmNotifyErr, pmSyslog - standard handling of error messages
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       void pmNotifyErr(int priority, const char *message, ...);
12       void pmSyslog(int onoff);
13
14       cc ... -lpcp
15

DESCRIPTION

17       These routines provide standard handling for error messages from within
18       the internals of Performance Co-Pilot  (PCP)  daemons  and  Performance
19       Metric Domain Agents (PMDAs).
20
21       pmNotifyErr is a printf(3) style function that will format message (and
22       any subsequent arguments) with a prefix that includes the current  date
23       and  time  from  ctime(3),  the name of the application from pmGetProg‐
24       name(3), the process's id from getpid(2) and the priority.
25
26       priority should be one of the level LOG_ macros defined for  syslog(3).
27       Most typically this would be LOG_INFO, LOG_WARNING or LOG_ERR.
28
29       pmNotifyErr  writes  to standard error, which for daemons and PMDAs has
30       most likely been redirected to a log file  using  pmOpenLog(3).   Addi‐
31       tionally  message  (and any subsequent arguments) may be sent forwarded
32       to syslog(3) if pmSyslog has previously been called with onoff having a
33       non-zero value.
34
35       Forwarding to syslog(3) can be disabled at any time by calling pmSyslog
36       with onoff having a zero value, and this is the starting state for each
37       PCP application.
38
39       In  the  style of syslog(3) message need not include a terminating new‐
40       line character (one will be added if required).
41

SEE ALSO

43       getpid(2),   ctime(3),   PMAPI(3),   pmGetProgname(3),    pmOpenLog(3),
44       printf(3) and syslog(3).
45
46
47
48Performance Co-Pilot                  PCP                       PMNOTIFYERR(3)
Impressum