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

NAME

6       pmErrStr, pmErrStr_r - convert a PMAPI error code into a string
7

C SYNOPSIS

9       #include <pcp/pmapi.h>
10
11       const char *pmErrStr(int code);
12       char *pmErrStr_r(int code, char *buf, int buflen);
13
14       cc ... -lpcp
15

DESCRIPTION

17       Translate  an  error code into a text string, suitable for generating a
18       diagnostic message.  The pmErrStr_r function does the same, but  stores
19       the result in a user-supplied buffer buf of length buflen, which should
20       have room for at least PM_MAXERRMSGLEN bytes.
21
22       By convention, all error codes are  negative.   The  small  values  are
23       assumed  to  be  negated versions of the Unix error codes as defined in
24       <errno.h> and the strings returned are as per strerror(3).  The larger,
25       negative  error  codes  are Performance Metrics Application Programming
26       Interface (PMAPI) error conditions and pmErrStr(3) returns an appropriā€
27       ate PMAPI error string, as determined by code.
28

NOTES

30       pmErrStr returns a pointer to a static buffer, so the returned value is
31       only valid until the next call to pmErrStr and  hence  is  not  thread-
32       safe.  Multi-threaded applications should use pmErrStr_r instead.
33

SEE ALSO

35       pmerr(1), PMAPI(3) and perror(3).
36
37
38
39Performance Co-Pilot                  PCP                          PMERRSTR(3)
Impressum