1PMLOGGER_CHECK(1) General Commands Manual PMLOGGER_CHECK(1)
2
3
4
6 pmlogger_check - administration of Performance Co-Pilot archive files
7
9 $PCP_BINADM_DIR/pmlogger_check [-CNPpqsTV?] [-c control] [-l logfile]
10
12 pmlogger_check and the related pmlogger_daily(1) tools along with asso‐
13 ciated control files (see pmlogger.control(5)) may be used to create a
14 customized regime of administration and management for historical ar‐
15 chives of performance data within the Performance Co-Pilot (see PCPIn‐
16 tro(1)) infrastructure.
17
18 pmlogger_check may be run at any time of the day and is intended to
19 check that a desired set of pmlogger(1) processes are running. If not,
20 it (re-)starts any missing logger processes. By default, pmlog‐
21 ger_check also calls pmlogger_daily(1) with a -K option to execute any
22 required archive compression tasks.
23
25 -C This option causes pmlogger_check to query the system service run‐
26 level information for pmlogger, and use that to determine whether
27 to start processes or not.
28
29 -c control, --control=control
30 Both pmlogger_check and pmlogger_daily(1) are controlled by PCP
31 logger control file(s) that specifies the pmlogger instances to be
32 managed. The default control file is $PCP_PMLOGGERCONTROL_PATH
33 but an alternate may be specified using the -c option. If the di‐
34 rectory $PCP_PMLOGGERCONTROL_PATH.d (or control.d from the -c op‐
35 tion) exists, then the contents of any additional control files
36 therein will be appended to the main control file (which must ex‐
37 ist).
38
39 -l file, --logfile=file
40 In order to ensure that mail is not unintentionally sent when
41 these scripts are run from cron(8) or systemd(1) diagnostics are
42 always sent to log files. By default, this file is
43 $PCP_LOG_DIR/pmlogger/pmlogger_check.log but this can be changed
44 using the -l option. If this log file already exists when the
45 script starts, it will be renamed with a .prev suffix (overwriting
46 any log file saved earlier) before diagnostics are generated to
47 the log file. The -l and -t options cannot be used together.
48
49 -N, --showme
50 This option enables a ``show me'' mode, where the actions are
51 echoed, but not executed, in the style of ``make -n''. Using -N
52 in conjunction with -V maximizes the diagnostic capabilities for
53 debugging.
54
55 -P, --only-primary
56 If this option is specified for pmlogger_check then only the pri‐
57 mary logger entry in the control files will be processed. This is
58 the logical opposite of the -p option described above and is in‐
59 tended for use by RC scripts that start only the primary logger,
60 such as the pmlogger.service unit. The -p and -P options are mu‐
61 tually exclusive.
62
63 -p, --skip-primary
64 If this option is specified for pmlogger_check then any line from
65 the control files for the primary pmlogger will be ignored. This
66 option is intended for environments where some system daemon, like
67 systemd(1), is responsible for controlling (starting, stopping,
68 restarting, etc.) the primary pmlogger.
69
70 -q, --quick
71 If this option is specified for pmlogger_check then the script
72 will ``quickstart'' avoiding any optional processing like calling
73 pmlogger_daily(1) to perform archive compression tasks.
74
75 -s, --stop
76 Use of this option provides the reverse pmlogger_check functional‐
77 ity, allowing the set of pmlogger processes to be cleanly shut‐
78 down.
79
80 -T, --terse
81 This option to pmlogger_check produces less verbose output than
82 the default. This is most suitable for a pmlogger ``farm'' where
83 many instances of pmlogger are expected to be running.
84
85 -V, --verbose
86 The -V option enables verbose tracing. By default pmlogger_check
87 generates no output unless some error or warning condition is en‐
88 countered. A second -V increases the verbosity. Using -N in con‐
89 junction with -V maximizes the diagnostic capabilities for debug‐
90 ging.
91
92 -?, --help
93 Display usage message and exit.
94
96 Refer to pmlogger.control(5) for a description of the control file(s)
97 that are used to control which pmlogger instances and which archives
98 are managed by pmlogger_check and pmlogger_daily(1).
99
100 The pmlogctl(1) utility may invoke pmlogger_check using the sudo(1)
101 command to run it under the $PCP_USER ``pcp'' account. If sudo is con‐
102 figured with the non-default requiretty option (see below), pmlog‐
103 ger_check may fail to run due to not having a tty configured. This is‐
104 sue can be resolved by adding a second line (expand $PCP_BINADM_DIR ac‐
105 cording to your platform) to the /etc/sudoers configuration file as
106 follows:
107
108 Defaults requiretty
109 Defaults!$PCP_BINADM_DIR/pmlogger_check !requiretty
110
111 Note that the unprivileged PCP account under which these commands run
112 uses /sbin/nologin as the shell, so the requiretty option is ineffec‐
113 tive here and safe to disable in this way.
114
116 $PCP_VAR_DIR/config/pmlogger/config.default
117 default pmlogger configuration file location for the local primary
118 logger, typically generated automatically by pmlogconf(1).
119
120 $PCP_ARCHIVE_DIR/<hostname>
121 default location for archives of performance information collected
122 from the host hostname
123
124 $PCP_ARCHIVE_DIR/<hostname>/lock
125 transient lock file to guarantee mutual exclusion during pmlogger
126 administration for the host hostname - if present, can be safely
127 removed if neither pmlogger_daily(1) nor pmlogger_check are run‐
128 ning
129
130 $PCP_ARCHIVE_DIR/<hostname>/Latest
131 PCP archive folio created by mkaf(1) for the most recently
132 launched archive containing performance metrics from the host
133 hostname
134
135 $PCP_LOG_DIR/NOTICES
136 PCP ``notices'' file used by pmie(1) and friends
137
138 $PCP_LOG_DIR/pmlogger/pmlogger_check.log
139 if the previous execution of pmlogger_check produced any output it
140 is saved here. The normal case is no output in which case the
141 file does not exist.
142
143 $PCP_ARCHIVE_DIR/<hostname>/SaveLogs
144 if this directory exists, then the log file from the -l argument
145 of a newly launched pmlogger(1) for hostname will be linked into
146 this directory with the name archive.log where archive is the
147 basename of the associated pmlogger(1) PCP archive files. This
148 allows the log file to be inspected at a later time, even if sev‐
149 eral pmlogger(1) instances for hostname have been launched in the
150 interim. Because the PCP archive management tools run under the
151 $PCP_USER account ``pcp'', $PCP_ARCHIVE_DIR/<hostname>/SaveLogs
152 typically needs to be owned by the user ``pcp''.
153
155 Environment variables with the prefix PCP_ are used to parameterize the
156 file and directory names used by PCP. On each installation, the file
157 /etc/pcp.conf contains the local values for these variables. The
158 $PCP_CONF variable may be used to specify an alternative configuration
159 file, as described in pcp.conf(5).
160
161 The default behaviour, when pmlogger(1) configuration comes from pmlog‐
162 conf(1), is to regenerate the configuration file and check for changes
163 whenever pmlogger(1) is started from pmlogger_check. If the PMDA con‐
164 figuration is stable, this is not necessary, and setting $PMLOG‐
165 GER_CHECK_SKIP_LOGCONF to yes disables the regeneration and checking.
166
168 mkaf(1), PCPIntro(1), pmie(1), pmlc(1), pmlogconf(1), pmlogctl(1), pm‐
169 logger(1), pmlogger_daily(1), pmlogger_daily_report(1), sudo(1), sys‐
170 temd(1), pmlogger.control(5) and cron(8).
171
172
173
174Performance Co-Pilot PCP PMLOGGER_CHECK(1)