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/pmda.h>
11
12 void pmdaOpenLog(pmdaInterface * dispatch);
13
14 cc ... -lpcp_pmda -lpcp
15
17 pmdaOpenLog redirects stderr to the logfile specified in the dispatch
18 structure, set by the previous call to pmdaDaemon(3) or pmdaGetOpt(3).
19 The first line of the log file will detail the name of the calling
20 process, the host the process is running on, and the current time. In
21 addition, the log is appended with the exit time of the process by a
22 routine registered with atexit(3).
23
25 The PMDA must be using PMDA_PROTOCOL_2 or later, as specified in the
26 call to pmdaDSO(3) or pmdaDaemon(3).
27
29 Environment variables with the prefix PCP_ are used to parameterize the
30 file and directory names used by PCP. On each installation, the file
31 /etc/pcp.conf contains the local values for these variables. The
32 $PCP_CONF variable may be used to specify an alternative configuration
33 file, as described in pcp.conf(5). Values for these variables may be
34 obtained programmatically using the pmGetConfig(3) function.
35
37 pmcd(1), atexit(2), PMAPI(3), PMDA(3), pmdaDaemon(3) and pmdaGetOpt(3).
38
39
40
41Performance Co-Pilot PCP PMDAOPENLOG(3)