---
name: "pmlogger_check"
section: "1"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pmlogger_check"
---

# pmlogger\_check(1)

administration of Performance Co-Pilot archive files

## NAME

**pmlogger\_check** - administration of Performance Co-Pilot archive files

## SYNOPSIS

**$PCP\_BINADM\_DIR/pmlogger\_check** \[**-CNnPpqsTV?**\] \[**-c** *control*\] \[**-l** *logfile*\]

## DESCRIPTION

**pmlogger\_check** and the related [**pmlogger\_daily**(1)](/pmlogger_daily/1.md) tools along with associated control files (see [**pmlogger.control**(5)](/pmlogger.control/5.md)) may be used to create a customized regime of administration and management for historical archives of performance data within the Performance Co-Pilot (see [**PCPIntro**(1)](/PCPIntro/1.md)) infrastructure.

**pmlogger\_check** may be run at any time of the day and is intended to check that a desired set of [**pmlogger**(1)](/pmlogger/1.md) processes are running. If not, it (re-)starts any missing logger processes. By default, **pmlogger\_check** also calls [**pmlogger\_daily**(1)](/pmlogger_daily/1.md) with a **-K** option to execute any required archive compression tasks.

## OPTIONS

- **-C**

  This option causes **pmlogger\_check** to query the system service runlevel information for **pmlogger**, and use that to determine whether to start processes or not.

- **-c** *control*, **--control**=*control*

  Both **pmlogger\_check** and [**pmlogger\_daily**(1)](/pmlogger_daily/1.md) are controlled by PCP logger control file(s) that specifies the **pmlogger** instances to be managed. The default *control* file is *$PCP\_PMLOGGERCONTROL\_PATH* but an alternate may be specified using the **-c** option. If the directory *$PCP\_PMLOGGERCONTROL\_PATH*.d (or *control*.d from the **-c** option) exists, then the contents of any additional *control* files therein will be appended to the main control file (which must exist).

- **-l** *file*, **--logfile**=*file*

  In order to ensure that mail is not unintentionally sent when these scripts are run from [**cron**(8)](/cron/8.md) or [**systemd**(1)](/systemd/1.md) diagnostics are always sent to log files. By default, this file is *$PCP\_LOG\_DIR/pmlogger/pmlogger\_check.log* but this can be changed using the **-l** option. If this log *file* already exists when the script starts, it will be renamed with a *.prev* suffix (overwriting any log file saved earlier) before diagnostics are generated to the log file. The **-l** and **-t** options cannot be used together.

- **-N**, **--showme**

  This option enables a \`\`show me'' mode, where the actions are echoed, but not executed, in the style of \`\`make -n''. Using **-N** in conjunction with **-V** maximizes the diagnostic capabilities for debugging.

- **-n**, **--noerror**

  Force the exit status to be 0 other than for catastrophic errors. Useful when called from a [**systemd**(1)](/systemd/1.md) service or timer unit so that the associated unit is not marked as failed in a way that would prevent subsequent execution from [**systemd**(1)](/systemd/1.md).

- **-P**, **--only-primary**

  If this option is specified for **pmlogger\_check** then only the primary logger entry in the control files will be processed. This is the logical opposite of the **-p** option described above and is intended for use by RC scripts that start only the primary logger, such as the **pmlogger.service** unit. The **-p** and **-P** options are mutually exclusive.

- **-p**, **--skip-primary**

  If this option is specified for **pmlogger\_check** then any line from the control files for the *primary* **pmlogger** will be ignored. This option is intended for environments where some system daemon, like [**systemd**(1)](/systemd/1.md), is responsible for controlling (starting, stopping, restarting, etc.) the *primary* **pmlogger**.

- **-q**, **--quick**

  If this option is specified for **pmlogger\_check** then the script will \`\`quickstart'' avoiding any optional processing like calling [**pmlogger\_daily**(1)](/pmlogger_daily/1.md) to perform archive compression tasks.

- **-s**, **--stop**

  Use of this option provides the reverse **pmlogger\_check** functionality, allowing the set of **pmlogger** processes to be cleanly shutdown.

- **-T**, **--terse**

  This option to **pmlogger\_check** produces less verbose output than the default. This is most suitable for a **pmlogger** \`\`farm'' where many instances of **pmlogger** are expected to be running.

- **-V**, **--verbose**

  The **-V** option enables verbose tracing. By default **pmlogger\_check** generates no output unless some error or warning condition is encountered. A second **-V** increases the verbosity. Using **-N** in conjunction with **-V** maximizes the diagnostic capabilities for debugging.

- **-?**, **--help**

  Display usage message and exit.

## CONFIGURATION

Refer to [**pmlogger.control**(5)](/pmlogger.control/5.md) for a description of the control file(s) that are used to control which **pmlogger** instances and which archives are managed by **pmlogger\_check** and [**pmlogger\_daily**(1)](/pmlogger_daily/1.md).

The [**pmlogctl**(1)](/pmlogctl/1.md) utility may invoke **pmlogger\_check** using the **sudo**(1) command to run it under the $PCP\_USER \`\`pcp'' account. If **sudo** is configured with the non-default *requiretty* option (see below), **pmlogger\_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/pmlogger_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.

## FILES

- *$PCP\_VAR\_DIR/config/pmlogger/config.default*

  default **pmlogger** configuration file location for the local primary logger, typically generated automatically by [**pmlogconf**(1)](/pmlogconf/1.md).

- *$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 during **pmlogger** administration for the host *hostname* - if present, can be safely removed if neither [**pmlogger\_daily**(1)](/pmlogger_daily/1.md) nor **pmlogger\_check** are running

- *$PCP\_ARCHIVE\_DIR/\<hostname\>/Latest*

  PCP archive folio created by [**mkaf**(1)](/mkaf/1.md) for the most recently launched archive containing performance metrics from the host *hostname*

- *$PCP\_LOG\_DIR/NOTICES*

  PCP \`\`notices'' file used by [**pmie**(1)](/pmie/1.md) and friends

- *$PCP\_LOG\_DIR/pmlogger/pmlogger\_check.log*

  if the previous execution of **pmlogger\_check** produced any output it is saved here. The normal case is no output in which case the file does not exist.

- *$PCP\_ARCHIVE\_DIR/SaveLogs*

  if this directory exists, then the log file from the **-l** argument for **pmlogger\_check** will be saved in this directory with the name of the format \<date\>-**pmlogger\_check**.**log**.\<pid\> This allows the log file to be inspected at a later time, even if several **pmlogger\_check** executions have been launched in the interim. Because the PCP archive management tools run under the $PCP\_USER account \`\`pcp'', *$PCP\_ARCHIVE\_DIR/SaveLogs* typically needs to be owned by the user \`\`pcp''.

- *$PCP\_ARCHIVE\_DIR/\<hostname\>/SaveLogs*

  if this directory exists, then the log file from the **-l** argument of a newly launched [**pmlogger**(1)](/pmlogger/1.md) for *hostname* will be saved in this directory with the name *archive***.log** where *archive* is the basename of the associated [**pmlogger**(1)](/pmlogger/1.md) PCP archive files. This allows the log file to be inspected at a later time, even if several [**pmlogger**(1)](/pmlogger/1.md) instances for *hostname* have been launched in the interim. Because the PCP archive management tools run under the $PCP\_USER account \`\`pcp'', *$PCP\_ARCHIVE\_DIR/\<hostname\>/SaveLogs* typically 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. The **$PCP\_CONF** variable may be used to specify an alternative configuration file, as described in [**pcp.conf**(5)](/pcp.conf/5.md).

The default behaviour, when [**pmlogger**(1)](/pmlogger/1.md) configuration comes from [**pmlogconf**(1)](/pmlogconf/1.md), is to regenerate the configuration file and check for changes whenever [**pmlogger**(1)](/pmlogger/1.md) 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.

## SEE ALSO

[**mkaf**(1)](/mkaf/1.md), [**PCPIntro**(1)](/PCPIntro/1.md), [**pmie**(1)](/pmie/1.md), [**pmlc**(1)](/pmlc/1.md), [**pmlogconf**(1)](/pmlogconf/1.md), [**pmlogctl**(1)](/pmlogctl/1.md), [**pmlogger**(1)](/pmlogger/1.md), [**pmlogger\_daily**(1)](/pmlogger_daily/1.md), [**pmlogger\_daily\_report**(1)](/pmlogger_daily_report/1.md), [**pmlogger\_janitor**(1)](/pmlogger_janitor/1.md), **sudo**(1), [**systemd**(1)](/systemd/1.md), [**pmlogger.control**(5)](/pmlogger.control/5.md) and [**cron**(8)](/cron/8.md).
