1PMDAOPENLOG(3) Library Functions Manual PMDAOPENLOG(3)
2
3
4
6 pmdaOpenLog - redirect stderr to a logfile
7
9 #include <pcp/pmapi.h>
10 #include <pcp/impl.h>
11 #include <pcp/pmda.h>
12
13 void pmdaOpenLog(pmdaInterface * dispatch);
14
15 cc ... -lpcp_pmda -lpcp
16
18 pmdaOpenLog redirects stderr to the logfile specified in the dispatch
19 structure, set by the previous call to pmdaDaemon(3) or pmdaGetOpt(3).
20 The first line of the log file will detail the name of the calling
21 process, the host the process is running on, and the current time. In
22 addition, the log is appended with the exit time of the process by a
23 routine registered with atexit(3C).
24
26 The PMDA must be using PMDA_PROTOCOL_2 or later, as specified in the
27 call to pmdaDSO(3) or pmdaDaemon(3).
28
29 A PMDA(3) which uses at least one sproc(2) may dump core on exit due to
30 a race condition with atexit(2) in some versions of IRIX. There is no
31 known solution for this problem at this time.
32
34 Environment variables with the prefix PCP_ are used to parameterize the
35 file and directory names used by PCP. On each installation, the file
36 /etc/pcp.conf contains the local values for these variables. The
37 $PCP_CONF variable may be used to specify an alternative configuration
38 file, as described in pcp.conf(4). Values for these variables may be
39 obtained programatically using the pmGetConfig(3) function.
40
42 pmcd(1), atexit(2), PMAPI(3), PMDA(3), pmdaDaemon(3) and pmdaGetOpt(3).
43
44
45
46Performance Co-Pilot SGI PMDAOPENLOG(3)