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 [-ApV?] [-a archivefile] [-f
11 outputfile] [-h hostname] [-l logfile] [-o directory] [-t interval]
12
14 pmlogger_daily_report and the associated systemd(1) services write
15 daily performance summary reports, much like those produced by sadc(1)
16 and the sa2(8) utility.
17
18 All of the command line arguments are optional and intended to be self
19 explanatory. The service is not enabled by default. If the service is
20 enabled and no arguments are specified, pmlogger_daily_report will be
21 run by systemd at 2am each morning and write a performance summary
22 report named sarXX (where XX is yesterdays day-of-the-month, wrapping
23 to the previous month if today is the 1st). The outputfile may be
24 changed with the -f option. The report will be written to the
25 $PCP_LOG_DIR/sa directory by default, but this may be changed with the
26 -o option to a different directory.
27
28 Note that there are suffciently flexible command line options for
29 pmlogger_daily_report to be used to read any archivefile and write the
30 report to any output directory.
31
32 If the -a option is not given, the default input archivefile is
33 $PCP_ARCHIVE_DIR/HOSTNAME/YYYYMMDD, where HOSTNAME defaults to the
34 local hostname (unless 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 The reports themselves are created by the pmrep(1) utility using its
42 default configuration file, see pmrep.conf(5). The pmrep(1) configura‐
43 tion entries used to write the reports is currently hardwired into the
44 pmlogger_daily_report script.
45
46 Finally, the input archives must contain sufficient metrics as needed
47 by pmrep(1) to write the report. On platforms that support it, the
48 pcp-zeroconf package configures PCP logging as required for this -
49 hence pmlogger_daily_report should be used with the pmlogger(1) config‐
50 uration that is set up by pcp-zeroconf. As the name suggests, pcp-
51 zeroconf requires no additional configuration after installation in
52 order to capture the required archives needed by pmlogger_daily_report.
53
55 The available command line options are:
56
57 -a archive
58 Specifies an alternate input archive file basename or directory
59 path.
60
61 -A Use the start and end times of input archive for the report, as
62 opposed to the default behaviour of 24 hours from midnight yester‐
63 day.
64
65 -f filename
66 Specifies an alternate output filename. -h hostname Specifies an
67 alternateA hostname to use within the default input archive file
68 path.
69
70 -l file, --logfile=file
71 In order to ensure that mail is not unintentionally sent when this
72 script is run from systemd(1) diagnostics are always sent to a log
73 file. By default, this file is $PCP_LOG_DIR/pmlogger/pmlog‐
74 ger_daily_report.log but this can be changed using the -l option.
75 If this log file already exists when the script starts, it will be
76 renamed with a .prev suffix (overwriting any log file saved ear‐
77 lier) before diagnostics are generated to the log file.
78
79 -p If this option is specified then the status of the daily process‐
80 ing is polled and if the report has not been done in the last 24
81 hours then it is done now. The intent is to have pmlog‐
82 ger_daily_report called regularly with the -p option (at 30 mins
83 past the hour, every hour in the default systemd(1) setup) to
84 ensure daily processing happens as soon as possible if it was
85 missed at the regularly scheduled time (2am by default), for exam‐
86 ple if the system was down or suspended at that time. With this
87 option, pmlogger_daily_report simply exits if the previous day's
88 processing has already been done.
89
90 -t interval
91 Specifies the sampling interval used when generating the report,
92 in the format described in PCPIntro(1). The default is every 10
93 minutes.
94
95 -V, --verbose
96 The output from the execution of the script may be extended using
97 this option which enables verbose tracing of activity. By default
98 the script generates no log output unless some error or warning
99 condition is encountered.
100
101 -?, --help
102 Display usage message and exit.
103
105 Environment variables with the prefix PCP_ are used to parameterize the
106 file and directory names used by PCP. On each installation, the file
107 /etc/pcp.conf contains the local values for these variables. The
108 $PCP_CONF variable may be used to specify an alternative configuration
109 file, as described in pcp.conf(5).
110
112 PCPIntro(1), pmlogger_daily(1), pmlogger(1), pmrep(1), sadc(1), sys‐
113 temd(1) and sa2(8).
114
115
116
117Performance Co-Pilot PCP PMLOGGER_DAILY_REPORT(1)