PMIE_CHECK(1)
πΈ PMIE_CHECK β the pmie_check(1) manual page, bestie edition πΈ
okay so this is the General Commands Manual page for pmie_check(1) and its sister pmie_daily, and honestly? it's giving "sysadmin but make it cute". stay with me, we're going through everything. π
β¨ NAME β¨
pmie_check, pmie_daily β the whole administration-and-management situation for the Performance Co-Pilot inference engine. that's the vibe. π§
π¦ SYNOPSIS π¦
$PCP_BINADM_DIR/pmie_check [-CNPpsTV?] [-c control] [-l logfile]
$PCP_BINADM_DIR/pmie_daily [-NV?] [-c control] [-k discard] [-l
logfile] [-m addresses] [-x compress] [-X program] [-Y regex]
π DESCRIPTION π
so basically there's this series of shell scripts + associated control files, and they exist so you can build your own customized little regime of administration and management for the Performance Co-Pilot inference engine β that's pmie(1) β and PCP itself, which is PCPIntro(1). π«Ά
pmie_check can be run literally whenever, any time of day, and its whole job is to check that the set of pmie processes you want running is actually running. if something's missing? it (re-)starts the missing inference engine processes. no cap. β¨
pmie_daily is the once-a-day girlie. run it once per day, preferably in the early morning, as soon after midnight as is practical. her task is rotating the log files for the running pmie processes β because those files can grow without bound if the print action is used, or if literally any other pmie action writes to its stdout/stderr streams. π and after some period, old pmie log files get discarded. bye bestie. ποΈ
π OPTIONS π
the available command line options are, in order, no skipping:
-c control,--control=controlβ bothpmie_checkandpmie_dailyare controlled by PCP inference engine control file(s), which specify thepmieinstances to be managed. the default control file is$PCP_PMIECONTROL_PATH, but you can hand over an alternate with the-coption. and here's the tea: if the directory$PCP_PMLOGGERCONTROL_PATH.d(orcontrol.dfrom the-coption) exists, then the contents of any additional control files in there get appended to the main control file β and that main control file must exist. periodt.-Cβ this one makespmie_checkquery the system service runlevel information forpmie, and use that to decide whether to start processes or not. let the system decide, iykyk. π₯-k period,--discard=periodβ the log retention period is 14 days by default, but you can change it with this option. two special values are recognized for the discard period:0to keep no log files beyond the current one, andforeverto prevent any log files being discarded at all. forever girlies, rise. π-l file,--logfile=fileβ so that mail doesn't get unintentionally sent when these scripts run fromcron(8), diagnostics are always sent to log files. by default those files are$PCP_LOG_DIR/pmie/pmie_daily.logand$PCP_LOG_DIR/pmie/pmie_check.log, but the-loption changes that. and heads up: if this log file already exists when the script starts, it gets renamed with a.prevsuffix (overwriting any log file saved earlier π³) before diagnostics are generated to the new log file.-m addresses,--mail=addressesβ using this option makespmie_dailyconstruct a summary of the log files generated for all monitored hosts in the last 24 hours (lines matchingOKare culled), and e-mail that summary to the set of space-separated addresses. inbox moment. π-N,--showmeβ enables a "show me" mode, where the programs' actions are echoed but not executed, in the style ofmake -n. using-Ntogether with-Vmaximizes the diagnostic capabilities for debugging. chef's kiss. π-s,--stopβ this gives you the reversepmie_checkfunctionality, letting the set ofpmieprocesses be cleanly shut down. we love a clean exit. β¨-p,--skip-primaryβ if you specify this forpmie_check, then any line from the control files for the primarypmiewill be ignored. this is intended for environments where some system daemon, likesystemd(1), is responsible for controlling the primarypmie(starting, stopping, restarting, etc.). let systemd have that one. π-P,--only-primaryβ if you specify this forpmie_check, then only the primarypmieentry in the control files will be processed. this is the logical opposite of the-poption above, and it's intended for RC scripts that start only the primarypmie, such as thepmie.serviceunit. π¨ and listen: the-pand-Poptions topmie_checkare mutually exclusive. pick a lane, bestie.-T,--terseβ this option topmie_checkproduces less verbose output than the default. most suitable for apmie"farm" where many instances ofpmieare expected to be running. quiet luxury. πΈ-V,--verboseβ the output from the cron execution of the scripts can be extended with-V, which enables verbose tracing of their activity. by default the scripts generate no output unless some error or warning condition is encountered. and again: using-Nin conjunction with-Vmaximizes the diagnostic capabilities for debugging. π-x period,--compress-after=periodβ log files can optionally be compressed after some period to conserve disk space. this is particularly useful for large numbers ofpmieprocesses under the control ofpmie_check. the-xoption specifies the number of days after which to compress archive data files.-X program,--compressor=programβ specifies the program to use for compression β by default this isxz(1). β¨-Y regex,--regex=regexβ lets you specify a regular expression that causes files in the set of files matched for compression to be omitted. this means only the data file gets compressed, and it also stops the program from attempting to compress it more than once. the default regex is"\.(meta|index|Z|gz|bz2|zip|xz|lzma|lzo|lz4|zst)$"β such files are filtered using the-voption toegrep(1).-?,--helpβ display the usage message and exit. the classic. π
π CONFIGURATION π
β οΈ Warning: the$PCP_PMIECONTROL_PATHand$PCP_PMIECONTROL_PATH.dfiles must not be writable by any user other than root. do not play with this one, fr fr. π
the control file(s) should be customized according to the following rules, which define the current version (1.1) of the control file format:
- lines beginning with a
#are comments. π¬ - lines beginning with a
$are assumed to be assignments to environment variables in the style ofsh(1), and all text following the$will beeval'ed by the script reading the control file, and the corresponding variable exported into the environment. this is particularly useful to set and export variables into the environment of the administrative script, e.g.
$ PMCD_CONNECT_TIMEOUT=20
- there must be a version line in the initial control file of the form:
$ version=1.1
- there should be one line in the control file(s) for each
pmieinstance, of the form:
host y|n y|n logfile args
- fields within a line of the control file(s) are separated by one or more spaces or tabs. π«Ά
- the first field is the name of the host that is the default source of the performance metrics for this
pmieinstance. - the second field indicates if this is a primary
pmieinstance (y) or not (n). since the primary inference engine must run on the local host, and there may be at most one primary for a particular host, this field can beyfor at most onepmieinstance β in which case the host name must be the name of the local host. when generatingpmieconfiguration files, the primary clause indicates thatpmieconf(1)should enable all rules in the primary group, in addition to all other default rules. main character energy only for one of them. π - the third field indicates whether this
pmieinstance needs to be started under the control ofpmsocks(1)to connect to apmcdthrough a firewall (yorn). π₯ - the fourth field is the name of the
pmieactivity log file. a useful convention is thatpmieinstances monitoring the local host with hostnamemyhostare maintained in the directory$PCP_LOG_DIR/pmie/myhost, while activity logs for the remote hostmumbleare maintained in$PCP_LOG_DIR/pmie/mumble. this is consistent with the waypmlogger(1)maintains its activity logs and archive files. consistency is the moment. β¨ - all other fields are interpreted as arguments to be passed to
pmie(1). most typically this would be the-coption.
the following sample control lines specify one pmie instance monitoring the local host (wobbly), and another monitoring performance metrics from the host splat:
wobbly n PCP_LOG_DIR/pmie/wobbly -c config.default
splat n PCP_LOG_DIR/pmie/splat -c splat/cpu.conf
typical crontab(5) entries for periodic execution of pmie_daily and pmie_check are given in $PCP_SYSCONF_DIR/pmie/crontab (unless installed by default in /etc/cron.d already) and shown below:
# daily processing of pmie logs
08 0 * * * $PCP_BINADM_DIR/pmie_daily
# every 30 minutes, check pmie instances are running
28,58 * * * * $PCP_BINADM_DIR/pmie_check
when using systemd(1) on Linux, no crontab entries are needed β the timer mechanism provided by systemd is used instead. slay. π§
the pmiectl(1) utility may invoke pmie_check using the sudo(1) command to run it under the $PCP_USER "pcp" account. and here's where it gets messy: if sudo is configured with the non-default requiretty option (see below), pmie_check may fail to run, due to not having a tty configured. π this issue can be resolved by adding a second line (expand $PCP_BINADM_DIR according to your platform) to the /etc/sudoers configuration file as follows:
Defaults requiretty
Defaults!$PCP_BINADM_DIR/pmie_check !requiretty
note that the unprivileged PCP account under which these commands run uses /sbin/nologin as the shell, so the requiretty option is ineffective here and safe to disable in this way. problem solved, bestie. π
π FILES π
okay bestie, here's the map of where everything lives πΊοΈβ¨
$PCP_PMIECONTROL_PATHβ this is the default PCP inference engine control file, the main character of the whole show π
β οΈ Warning: this file must not be writable by any user other than root. Like, not even a little bit. Lock it down fr fr π
$PCP_PMIECONTROL_PATH.dβ an optional directory holding additional PCP inference engine control files, usually like one per host π
β οΈ Warning: this files herein must not be writable by any user other than root. Same energy, same rule, no cap π«Ά
$PCP_SYSCONF_DIR/pmie/crontabβ a samplecrontabfor automated script execution by$PCP_USER(orroot). Heads up: this one only exists if your platform doesn't support the/etc/cron.dmechanism π°οΈ$PCP_VAR_DIR/config/pmie/config.defaultβ the defaultpmieconfiguration file location for a localhost inference engine, and it's typically generated automatically bypmieconf(1)β¨$PCP_LOG_DIR/pmie/pmie_check.logβ default location for thepmie_checklog file π When it's run as a daemon service, if thepmieprocess failed to start or exited early, there may be error messages sitting in here β especially if the daemon could not open it's own log file π$PCP_LOG_DIR/pmie/pmie_daily.logβ default location for error messages generated during the dailypmieservice maintenance operations π§Ή$PCP_LOG_DIR/pmie/<hostname>β default directory location for thepmielog file for the host hostname π$PCP_LOG_DIR/pmie/<hostname>/lockβ a transient lock file that guarantees mutual exclusion duringpmieadministration for the host hostname π If it's present, it can be safely removed as long as neitherpmie_dailynorpmie_checkare running. Do NOT just yeet it while they're live, bestie, that's chaos π$PCP_LOG_DIR/NOTICESβ the PCP "notices" file, used bypmie(1)and friends π’
π PCP ENVIRONMENT π
So like, environment variables with the prefix PCP_ are what parameterize the file and directory names that PCP uses π On each installation, the file /etc/pcp.conf contains the local values for these variables. And the $PCP_CONF variable may be used to specify an alternative configuration file, as described in pcp.conf(5) β¨
π SEE ALSO π
go read these next, i'm obsessed with cross-references honestly ππ
and that's the whole page, bestie ππ you made it to the end, iconic behavior, no notes π
this lil masterpiece comes to you from Performance Co-Pilot (that's the PCP crew π¦), it's the PMIE_CHECK(1) page, and the date on it is the one stamped at the bottom of the original β¨
now go lock down your control files and stan a healthy inference engine ππ
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: pcp 6.3.8-1
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu questing: pcp 6.3.8-1
- ubuntu resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2013-2016,2019 Red Hat
- Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms