1PMLOGGER_DAILY_REPORT(1) General Commands Manual PMLOGGER_DAILY_REPORT(1)
2
3
4
6 pmlogger_daily_report - write Performance Co-Pilot daily summary
7 reports
8
10 $PCP_BINADM_DIR/pmlogger_daily_report [-a archivefile] [-f outputfile]
11 [-h hostname] [-l logfile] [-o directory] [-p] [-t interval] [-A] [-V]
12 [--help]
13
15 pmlogger_daily_report and the associated crontab(5) entry (depending on
16 local platform, either $PCP_ETC_DIR/cron.d/pcp-pmlogger-daily-report or
17 $PCP_SYSCONF_DIR/pmlogger/crontab-daily-report) write daily performance
18 summary reports, much like those produced by sadc(1) and the sa2(8)
19 utility.
20
21 All of the command line arguments are optional and intended to be self
22 explanatory. If no arguments are specified, pmlogger_daily_report will
23 be run by cron(8) at 2am each morning and write a performance summary
24 report named sarXX (where XX is yesterdays day-of-the-month, wrapping
25 to the previous month if today is the 1st). The outputfile may be
26 changed with the -f option. The report will be written to the
27 $PCP_LOG_DIR/sa directory by default, but this may be changed with the
28 -o option to a different directory. Note the default crontab(5) entry
29 currently specifies $PCP_LOG_DIR/sa as the output directory; this may
30 be changed in the future.
31
32 If the -a option is not given, the default input archivefile is
33 $PCP_LOG_DIR/pmlogger/HOSTNAME/YYYYMMDD, where HOSTNAME defaults to the
34 local hostname (may be changed with the -h option) and YYYYMMDD is the
35 base name of yesterdays merged archive, as produced by pmlogger(1) and
36 the pmlogger_daily(1) scripts. If archivefile is a directory, then
37 pmlogger_daily_report will use all PCP archives found in that directory
38 to write the report (this is known as multi-archive mode, and may be
39 considerably slower than specifying a single archive as the input).
40
41 Note that there are suffciently flexible command line options for
42 pmlogger_daily_report to be used to read any archivefile and write the
43 report to any output directory. As such, this tool can be configured
44 by editing the crontab entry, $PCP_ETC_DIR/cron.d/pcp-pmlogger-daily-
45 report and adding whatever command line options are required.
46
47 If the -p option is specified then the status of the daily processing
48 is polled and if the report has not been done in the last 24 hours then
49 it is done now. The intent is to have pmlogger_daily_report called
50 regularly with the -p option (at 30 mins past the hour, every hour in
51 the default cron(8) set up) to ensure daily processing happens as soon
52 as possible if it was missed at the regularly scheduled time (which is
53 02:00 by default), e.g. if the system was down or suspended at that
54 time.
55
56 With the -p option, pmlogger_daily_report simply exits if the previous
57 day's processing has already been done.
58
59 The reports themselves are created by the pmrep(1) utility using its
60 default configuration file, see pmrep.conf(5). The pmrep(1) configura‐
61 tion entries used to write the reports is currently hardwired into the
62 pmlogger_daily_report script.
63
64 Finally, the input archives must contain sufficient metrics as needed
65 by pmrep(1) to write the report. On platforms that support it, the
66 pcp-zeroconf package configures PCP logging as required for this -
67 hence pmlogger_daily_report should be used with the pmlogger(1) config‐
68 uration that is set up by pcp-zeroconf. As the name suggests, pcp-
69 zeroconf requires no additional configuration after installation in
70 order to capture the required archives needed by pmlogger_daily_report.
71
72 In order to ensure that mail is not unintentionally sent when this
73 script is run from cron(8) diagnostics are always sent to a log file.
74 By default, this file is $PCP_LOG_DIR/pmlogger/pmlog‐
75 ger_daily_report.log but this can be changed using the -l option. If
76 this log file already exists when the script starts, it will be renamed
77 with a .prev suffix (overwriting any log file saved earlier) before
78 diagnostics are generated to the log file.
79
80 The output from the cron(8) execution of the script may be extended
81 using the -V option which enables verbose tracing of activity. By
82 default the script generates no log output unless some error or warning
83 condition is encountered.
84
86 Environment variables with the prefix PCP_ are used to parameterize the
87 file and directory names used by PCP. On each installation, the file
88 /etc/pcp.conf contains the local values for these variables. The
89 $PCP_CONF variable may be used to specify an alternative configuration
90 file, as described in pcp.conf(5).
91
93 PCPIntro(1), pmlogger_daily(1), pmlogger(1), pmrep(1), sadc(1),
94 crontab(5), sa2(8) and cron(8).
95
96
97
98Performance Co-Pilot PCP PMLOGGER_DAILY_REPORT(1)