PMLOGGER_CHECK(1)
πΈ pmlogger_check β admin of Performance Co-Pilot archive files πΈ
okay so bestie, welcome to pmlogger_check, part of the Performance Co-Pilot fam. this is a General Commands Manual page and it's lowkey a whole vibe. let's get into it π
β¨ SYNOPSIS β¨
$PCP_BINADM_DIR/pmlogger_check [-CNnPpqsTV?] [-c control] [-l logfile]
π¦ DESCRIPTION π¦
so pmlogger_check and its bestie pmlogger_daily(1) (plus the control files that go with them β see pmlogger.control(5)) are how you build a customized regime of administration and management for your historical archives of performance data inside the Performance Co-Pilot (check PCPIntro(1)) infrastructure. it's giving organized queen energy.
pmlogger_check can be run any time of the day, no gatekeeping. its whole job? checking that the desired set of pmlogger(1) processes are actually running. and if they're not... it (re-)starts any missing logger processes. slay, she fixes things.
by default, pmlogger_check also calls pmlogger_daily(1) with a -K option so that any required archive compression tasks get executed. no cap. π«Ά
π OPTIONS π
-Cβ this makespmlogger_checkgo query the system service runlevel information forpmlogger, and then use that to figure out whether to start processes or not.-c control,--control=controlβ bothpmlogger_checkandpmlogger_daily(1)are controlled by PCP logger control file(s), and those files specify thepmloggerinstances to be managed. the default control file is$PCP_PMLOGGERCONTROL_PATH, but you can specify an alternate one with the-coption. and 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 (which must exist, bestie β that's the rule).-l file,--logfile=fileβ so that mail doesn't get unintentionally sent when these scripts are run fromcron(8)orsystemd(1), diagnostics always go to log files. by default that file is$PCP_LOG_DIR/pmlogger/pmlogger_check.log, but you can change it with the-loption. 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 log file. also heads up: the-land-toptions cannot be used together.-N,--showmeβ this turns on a "show me" mode, where the actions get echoed but not executed, in the style ofmake -n. and using-Ntogether with-Vmaximizes the diagnostic capabilities for debugging. the way that combo ate π-n,--noerrorβ forces the exit status to be0other than for catastrophic errors. super useful when it's called from asystemd(1)service or timer unit, so the associated unit doesn't get marked as failed in a way that would prevent subsequent execution fromsystemd(1).-P,--only-primaryβ if you specify this forpmlogger_check, then only the primary logger entry in the control files gets processed. this is the logical opposite of the-poption (described below, keep scrolling bestie) and it's intended for use by RC scripts that start only the primary logger, like thepmlogger.serviceunit. the-pand-Poptions are mutually exclusive β pick a lane.-p,--skip-primaryβ if you specify this forpmlogger_check, then any line from the control files for the primarypmloggergets ignored. this one's for environments where some system daemon, likesystemd(1), is the one responsible for controlling the primarypmlogger(starting, stopping, restarting, etc.).-q,--quickβ if you specify this forpmlogger_check, the script goes "quickstart" and avoids any optional processing, like callingpmlogger_daily(1)to perform archive compression tasks. fast girl behavior β¨-s,--stopβ using this gives you the reversepmlogger_checkfunctionality, letting the whole set ofpmloggerprocesses be cleanly shutdown.-T,--terseβ this produces less verbose output than the default. most suitable for apmlogger"farm" where a whole bunch ofpmloggerinstances are expected to be running. quiet, efficient, iconic.-V,--verboseβ enables verbose tracing. by defaultpmlogger_checkgenerates no output unless some error or warning condition is encountered. a second-Vincreases the verbosity. and again β using-Nin conjunction with-Vmaximizes the diagnostic capabilities for debugging.-?,--helpβ display usage message and exit. that's it, that's the whole thing π
π§ CONFIGURATION π§
go check pmlogger.control(5) for a description of the control file(s) used to control which pmlogger instances and which archives are managed by pmlogger_check and pmlogger_daily(1).
the pmlogctl(1) utility may invoke pmlogger_check using the sudo(1) command to run it under the $PCP_USER "pcp" account. and if sudo is configured with the non-default requiretty option (see below), pmlogger_check may fail to run because it doesn't have 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, like this:
Defaults requiretty
Defaults!$PCP_BINADM_DIR/pmlogger_check !requiretty
note that the unprivileged PCP account under which these commands run uses/sbin/nologinas the shell, so therequirettyoption is ineffective here and safe to disable in this way.
π FILES π
$PCP_VAR_DIR/config/pmlogger/config.defaultβ the defaultpmloggerconfiguration file location for the local primary logger, typically generated automatically bypmlogconf(1).$PCP_ARCHIVE_DIR/<hostname>β default location for archives of performance information collected from the host hostname.$PCP_ARCHIVE_DIR/<hostname>/lockβ transient lock file to guarantee mutual exclusion duringpmloggeradministration for the host hostname. if it's present, it can be safely removed if neitherpmlogger_daily(1)norpmlogger_checkare running. do not play with this one while they're live, fr fr π$PCP_ARCHIVE_DIR/<hostname>/Latestβ PCP archive folio created bymkaf(1)for the most recently launched archive containing performance metrics from the host hostname.$PCP_LOG_DIR/NOTICESβ PCP "notices" file used bypmie(1)and friends.$PCP_LOG_DIR/pmlogger/pmlogger_check.logβ if the previous execution ofpmlogger_checkproduced any output, it's saved here. the normal case is no output, in which case the file does not exist. (silent queen stays silent π)$PCP_ARCHIVE_DIR/SaveLogsβ if this directory exists, then the log file from the-largument forpmlogger_checkwill be saved in this directory with the name of the format<date>-pmlogger_check.log.<pid>. this lets the log file be inspected at a later time, even if severalpmlogger_checkexecutions have been launched in the interim. and because the PCP archive management tools run under the$PCP_USERaccount "pcp",$PCP_ARCHIVE_DIR/SaveLogstypically needs to be owned by the user "pcp".$PCP_ARCHIVE_DIR/<hostname>/SaveLogsβ if this directory exists, then the log file from the-largument of a newly launchedpmlogger(1)for hostname will be saved in this directory with the namearchive.log, wherearchiveis the basename of the associatedpmlogger(1)PCP archive files. this lets the log file be inspected at a later time, even if severalpmlogger(1)instances for hostname have been launched in the interim. and because the PCP archive management tools run under the$PCP_USERaccount "pcp",$PCP_ARCHIVE_DIR/<hostname>/SaveLogstypically needs to be owned by the user "pcp".
β PCP ENVIRONMENT β
environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. 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).
the default behaviour, when pmlogger(1) configuration comes from pmlogconf(1), is to regenerate the configuration file and check for changes whenever pmlogger(1) is started from pmlogger_check. if the PMDA configuration is stable, this is not necessary, and setting $PMLOGGER_CHECK_SKIP_LOGCONF to yes disables the regeneration and checking. main character energy: know when to skip the busywork π
π₯ SEE ALSO π₯
mkaf(1), PCPIntro(1), pmie(1), pmlc(1), pmlogconf(1), pmlogctl(1), pmlogger(1), pmlogger_daily(1), pmlogger_daily_report(1), pmlogger_janitor(1), sudo(1), systemd(1), pmlogger.control(5) and cron(8).
and that's the whole page bestie, you absolutely ate this one π«Ά this was brought to you by Performance Co-Pilot (that's the PCP crew, no cap) β go forth and manage those archives, periodt. πβ¨ππ¦πΈ
π¦ 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
- 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 resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2013-2019 Red Hat
- Copyright (c) 2000 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