Analyzing System Metrics with Performance Co-Pilot
The Performance Co-Pilot (PCP) analysis toolkit collects, processes and analyzes system performance metrics, either in real time or from archived logs. SUSE Linux Enterprise Server provides PCP as regular packages, so you install and configure it like any other system service, without needing a container runtime. Use PCP to monitor a single system locally or to centralize monitoring of several remote systems on one host.
Prerequisites
A running, registered instance of SUSE Linux Enterprise Server
1 What is Performance Co-Pilot analysis toolkit? #
Performance data is collected by performance metrics domain
agents (PMDAs), one per subsystem such as the kernel, disks or
a database. Each PMDA passes its metrics to the
pmcd daemon, which is the single
point of contact for all other PCP tools. pmlogger
is the tool that turns those live metrics into an archive you can query
later, and pminfo queries them directly, without
logging anything.
2 Installing PCP #
This chapter covers installing pcp via Zypper in standard mode or via transactional-update in immutable mode.
2.1 Installing PCP in standard mode #
Install the pcp package with Zypper:
>sudozypper install pcp
Alternatively, install the pcp-zeroconf package
instead. It installs pcp as a dependency and
additionally enables and starts pmcd,
pmlogger and pmproxy automatically,
with a shorter, 10-second sampling interval. Use it if you want local
monitoring running immediately without configuring the services yourself,
as described in Section 3, “Enabling PCP services”:
>sudozypper install pcp-zeroconf
2.2 Installing PCP in immutable mode #
On the immutable mode of SLES, install either package
through transactional-update instead:
>sudotransactional-update pkg install pcp
Or, for the zero-configuration variant:
>sudotransactional-update pkg install pcp-zeroconf
Changes take effect only after a reboot:
>sudoreboot
3 Enabling PCP services #
Installing the pcp package installs several
systemd services, all disabled by default. PCP provides the following services:
pmcdThe Performance Metrics Collector Daemon. It coordinates the gathering and exporting of performance statistics in response to requests from PCP tools, and is required by every other PCP service. By default, it listens only on the local host, on port 44321.
pmloggerRecords the metrics exported by
pmcdto archive logs, by default under/var/log/pcp/pmlogger/HOSTNAME/.pmproxyExposes a REST API (PMWEBAPI) to access metrics remotely, on port 44322 by default. Unlike
pmcd, it listens on all interfaces by default.pmieThe inference engine. It evaluates the exported metrics against a set of rules and can trigger an action, for example, an alert, when a rule matches.
Enable and start the services you need with systemctl.
For example, to enable local metric collection and logging:
>sudosystemctl enable --now pmcd pmlogger
Add pmproxy or pmie to the same
command if you need the REST API or the inference engine.
By default, pmcd only accepts connections from the
local host, and firewalld does not open a port for either
pmcd or pmproxy. If you need
to reach either service from another system, open the corresponding port:
>sudofirewall-cmd --add-port=PORT/tcp --permanent>sudofirewall-cmd --reload
Use port 44321 for pmcd and
44322 for pmproxy. Allowing
remote connections to pmcd also requires changing
PMCD_LOCAL, as described in
Section 4, “Configuring pmcd and pmlogger”.
4 Configuring pmcd and pmlogger #
Every PCP service has a default configuration that might not suit your
needs. To customize a service, edit its configuration file directly and
restart the service. For example, to customize pmcd, run:
>sudovi /etc/sysconfig/pmcd>sudosystemctl restart pmcd
4.1 Configuring the pmcd daemon #
The pmcd daemon configuration is stored in the
/etc/sysconfig/pmcd file. The file stores
environment variables that modify the behavior of the
pmcd daemon.
You can add the following variables to the
/etc/sysconfig/pmcd file to configure the
pmcd daemon:
- PMCD_LOCAL
Defines whether a remote host can connect to the
pmcddaemon. If set to 0, remote connections to the daemon are allowed. If set to 1, the daemon listens only on the local host. The default value is 1.- PMCD_MAXPENDING
Defines the maximum count of pending connections to the agent. The default value is 5.
- PMCD_ROOT_AGENT
If the
pmdarootis enabled (the value is set to 1), adding a new PDMA does not trigger restarting of other PMDAs. Ifpmdarootis not enabled,pmcdwill require restarting all PMDAs when a new PMDA is added. The default value is 1.- PMCD_RESTART_AGENTS
If set to 1, the
pmcddaemon tries to restart any exited PMDA. Enable this option only if you have enabledpmdaroot, aspmcditself does not have privileges to restart PMDA. The default value is 1.- PMCD_WAIT_TIMEOUT
Defines the maximum time in seconds
pmcdcan wait to accept a connection. After this time, the connection is reported as failed. The default value is 60.- PCP_NSS_INIT_MODE
Defines the mode in which
pmcdinitializes the NSS certificate database when secured connections are used. The default value isreadonly. You can set the mode toreadwrite, but if the initialization fails, the default value is used as a fallback.
For example, to allow remote connections and increase the connection timeout, change only these two lines and leave the rest at their default:
PMCD_LOCAL=0 PMCD_WAIT_TIMEOUT=70
4.2 Setting pmlogger variables #
The custom configuration for the pmlogger is stored in
the following configuration files:
/etc/sysconfig/pmlogger/etc/pcp/pmlogger/control.d/local
4.2.1 The /etc/sysconfig/pmlogger file #
You can use the following attributes to configure the
pmlogger:
- PMLOGGER_LOCAL
Defines whether
pmloggerallows connections from remote hosts. If set to 1,pmloggerallows connections from a local host only. The default value is 1.- PMLOGGER_MAXPENDING
Defines the maximum count of pending connections. The default value is 5.
- PMLOGGER_INTERVAL
Defines the default sampling interval
pmloggeruses. The default value is 60 s, unless pcp-zeroconf is installed, in which case the default is 10 s. Thepmloggercommand line overrides this value.- PMLOGGER_CHECK_SKIP_LOGCONF
Setting this option to yes disables the regeneration and checking of the
pmloggerconfiguration if the configurationpmloggercomes frompmlogconf. The default behavior is to regenerate configuration files and check for changes every timepmloggeris started.- PMLOGGER_CHECK_SKIP_JANITOR
By default,
pmlogger_checkalso runspmlogger_janitorto detectpmloggerprocesses or files that became detached from the control files that used to manage them. Setting this option to yes disablespmlogger_janitor, which can be useful for QA or other special testing.
An example follows:
PMLOGGER_LOCAL=1 PMLOGGER_MAXPENDING=5 PMLOGGER_INTERVAL=10 PMLOGGER_CHECK_SKIP_LOGCONF=yes
4.2.2 The /etc/pcp/pmlogger/control.d/local file #
The file /etc/pcp/pmlogger/control.d/local stores
specifications of the host, which metrics should be logged, the logging
frequency (default is 24 hours), and pmlogger
options. For example:
# === VARIABLE ASSIGNMENTS === # # DO NOT REMOVE OR EDIT THE FOLLOWING LINE $version=1.1 # Uncomment one of the lines below to enable/disable compression behaviour # that is different to the pmlogger_daily default. # Value is days before compressing archives, 0 is immediate compression, # "never" or "forever" suppresses compression. # #$PCP_COMPRESSAFTER=0 #$PCP_COMPRESSAFTER=3 #$PCP_COMPRESSAFTER=never # === LOGGER CONTROL SPECIFICATIONS === # #Host P? S? directory args # local primary logger LOCALHOSTNAME y n PCP_ARCHIVE_DIR/LOCALHOSTNAME -r -T24h10m -c config.default -v 100Mb
The LOCALHOSTNAME entry shown above logs
metrics from the local host only. To collect metrics from a
remote client instead, see
Section 5.3, “Recording metrics from remote systems”.
5 Managing PCP metrics #
To check the local setup, use pminfo to list metrics and the pcp command. You can also collect metrics from remote systems on one central host.
5.1 Listing PCP metrics #
When pmcd is running, use the command
pminfo to list metrics. It requires no special
privileges. For example, to list all available performance metrics, run:
>pminfo
You can list a group of related metrics by specifying the metrics prefix:
>pminfoMETRIC_PREFIX
For example, to list all metrics related to disks, use:
>pminfodisk disk.dev.r_await disk.dm.await disk.dm.r_await disk.md.await disk.md.r_await ...
You can also specify additional strings to narrow down the list of metrics, for example:
>pminfodisk.dev disk.dev.read disk.dev.write disk.dev.total disk.dev.blkread disk.dev.blkwrite disk.dev.blktotal ...
To get online help text of a particular metric, use the -t
option followed by the metric, for example:
>pminfo-t kernel.cpu.util.user kernel.cpu.util.user [percentage of user time across all CPUs, including guest CPU time]
To display a description text of a particular metric, use the
-T option followed by the metric, for example:
>pminfo-T kernel.cpu.util.user Help: percentage of user time across all CPUs, including guest CPU time
5.2 Checking local metrics #
After you enable the PCP services, you can verify that metrics are being recorded properly by running the following command:
>sudopcpPerformance Co-Pilot configuration on node1: platform: Linux node1 6.12.0-160099.49-default #1 SMP PREEMPT_DYNAMIC Thu Aug 6 09:32:38 UTC 2026 (e38429b) x86_64 hardware: 2 cpus, 1 disk, 1 node, 3917MB RAM timezone: UTC services: pmcd pmproxy pmcd: Version 6.3.8-1, 9 agents, 1 client pmda: root pmcd proc pmproxy xfs linux mmv kvm jbd2 pmlogger: primary logger: /var/log/pcp/pmlogger/node1/20260607.09.24
Now check if the logs are written to a proper destination:
>lsPATH_TO_PMLOGGER_LOGS
where PATH_TO_PMLOGGER_LOGS should be
/var/log/pcp/pmlogger/HOSTNAME/,
with HOSTNAME being the machine's own host
name, the output of the hostname command—for
example, /var/log/pcp/pmlogger/node1/.
5.3 Recording metrics from remote systems #
You can collect metrics from several remote systems (clients) on a
central monitoring system. Each client needs only pmcd
running and reachable. pmlogger on the monitoring
system then pulls the metrics from every client and logs them locally.
On each client, install PCP as described in Section 2, “Installing PCP”, then allow remote connections and enable
pmcd:>sudosed -i 's/^PMCD_LOCAL=1/PMCD_LOCAL=0/' /etc/sysconfig/pmcd>sudosystemctl enable --now pmcdOn each client, open the
pmcdport infirewalld:>sudofirewall-cmd --add-port=44321/tcp --permanent>sudofirewall-cmd --reloadOn the monitoring system, create a
pmloggercontrol file for each client under/etc/pcp/pmlogger/control.d/, for example/etc/pcp/pmlogger/control.d/CLIENT, with the following content:$version=1.1 CLIENT_HOSTNAME n n PCP_ARCHIVE_DIR/CLIENT -N -r -T24h10m -c config.default -v 100Mb
CLIENT_HOSTNAME must be resolvable in DNS; you can use an IP address or a fully qualified domain name (FQDN) instead. For details about the control file format, see Section 4.2.2, “The
/etc/pcp/pmlogger/control.d/localfile”.Warning: Silent logging failure from a pre-created archive directoryLeave
PCP_ARCHIVE_DIR/CLIENT(by default,/var/log/pcp/pmlogger/CLIENT) forpmloggerto create itself, with the correct ownership. If it already exists and is owned byroot,pmlogger—which runs as thepcpuser—cannot write its lock file there, and logging fails without an obvious error.Trigger a check so
pmloggerapplies the new control file immediately, instead of waiting for the next scheduled run ofpmlogger_check.timer:>sudosystemctl start pmlogger_check.serviceConfirm that metrics are being collected from the client:
>ls-l /var/log/pcp/pmlogger/CLIENT/ total 288 -rw-r--r--. 1 pcp pcp 35032 Sep 3 16:07 20260903.16.07.0 -rw-r--r--. 1 pcp pcp 904 Sep 3 16:07 20260903.16.07.index -rw-r--r--. 1 pcp pcp 219161 Sep 3 16:07 20260903.16.07.meta -rw-r--r--. 1 pcp pcp 276 Sep 3 16:07 Latest -rw-r--r--. 1 pcp pcp 27174 Sep 3 16:07 pmlogger.log
6 For more information #
For more information about PCP, see the upstream documentation at https://pcp.readthedocs.io/en/latest/UAG/IntroductionToPcp.html.
To learn more about individual tools, see the man pages of
pmcd,pmloggerandpminfo.
7 Legal Notice #
Copyright© 2006– 2026 SUSE LLC and contributors. All rights reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”.
For SUSE trademarks, see https://www.suse.com/company/legal/. All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its affiliates. Asterisks (*) denote third-party trademarks.
All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors, nor the translators shall be held liable for possible errors or the consequences thereof.