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