PMDAPROC(1)
PMDAPROC π β¨
okay so bestie, this is the man page for pmdaproc, section 1 of the general commands manual. it's the process performance metrics domain agent, aka the PMDA that knows literally everything about what your processes are doing. buckle up, she's a long one π
β¨ NAME β¨
pmdaproc β process performance metrics domain agent (PMDA)
πΈ SYNOPSIS πΈ
$PCP_PMDAS_DIR/proc/pmdaproc [-AL] [-D debug] [-d domain] [-l logfile]
[-r cgroup] [-U username]
π DESCRIPTION π
pmdaproc is a Performance Metrics Domain Agent (PMDA) that pulls out performance metrics describing the state of the individual processes running on a Linux system. like, every single one. it's giving surveillance but make it β¨observabilityβ¨.
the proc PMDA exports metrics that measure the memory, processor and other resource use of each process, plus summary info collated across all of the running processes. this includes per-process NUMA placement summaries from /proc/<pid>/numa_maps via the proc.numa_maps.* metrics. yes bestie, NUMA too, we're thorough.
the PMDA uses credentials passed from the PMAPI(3) monitoring tool identifying the user requesting the information, to make sure that only values the user is allowed to access get returned by the PMDA. how? it temporarily changes its effective user and group identifiers for the duration of requests for instances and values. in other words, the system calls to extract info are performed as the user originating the request, not as a privileged user. periodt. the mechanisms available for transfer of user credentials are described further in the PCPIntro(1) page.
here's a lil rundown of the pmdaproc command line options, bestie:
-Aβ disables use of the credentials provided by PMAPI client tools and simply runs everything under the"root"account. refer to the ACCESS CONFIGURATION section below for finer grained control when usingpmcd(1)with remote client authentication. only enable this option if you understand the risks involved, and are sure that all remote accesses will be from benevolent users. if enabled, unauthenticated remote PMAPI clients will be able to access potentially sensitive performance metric values which an unauthenticated PMAPI client usually would not be able to. refer to CVE-2011-2495 and CVE-2012-3419 for additional details. π¨-Lβ changes the per-process instance domain used by mostpmdaprocmetrics to include threads as well. threads girlies, this one's for you π§΅-ddomain β it is absolutely crucial that the performance metrics domain number specified here is unique and consistent. that is, domain should be different for every PMDA on the one host, and the same domain number should be used for the same PMDA on all hosts. no cap, this matters.-llogfile β location of the log file. by default, a log file namedproc.logis written in the current directory ofpmcd(1)whenpmdaprocis started, i.e.$PCP_LOG_DIR/pmcd. if the log file cannot be created or is not writable, output is written to the standard error instead.-rcgroup β restrict the set of processes exported in the per-process instance domain to only those processes that are contained by the specified cgroup resource container. this option provides an optional finer granularity to the monitoring, and can also be used to reduce the resources consumed bypmdaprocduring requests for instances and values.-Uusername β user account under which to run the agent. the default is the privileged"root"account, withseteuid (2)andsetegid (2)switching for accessing most information.
π₯ HOTPROC OVERVIEW π₯
the pmdaproc Performance Metrics Domain Agent (PMDA) includes an additional set of per-process metrics with an instance domain of processes restricted to an "interesting" or "hot" set. unlike the stock metrics exported by the proc PMDA, which have an instance domain equal to the current processes, hot metrics have an instance domain which is a subset of this. this hotproc instance domain is determined by a configurable predicate evaluated over some refresh interval.
as well as the equivalent per-process proc metrics, hotproc provides:
- a
cpuburnmetric which specifies the CPU utilization of the process over the refresh interval totalmetrics which indicate how much of the available CPU time the"interesting"processes account forpredicatemetrics which show the values of the reserved variables (see below) that are being used in the hotproc predicatecontrolmetrics for controlling the agent
iconic, honestly. π
π HOTPROC CONFIGURATION π
the configuration file consists of one predicate used to determine if a process should be in the interesting set or not.
an example configuration file may be found at $PCP_PMDAS_DIR/proc/samplehotproc.conf
this file with any modifications can be copied to $PCP_PMDAS_DIR/proc/hotproc.conf in order to configure the hot metrics. the pmstore(1) and pmStore(3) interfaces can be used as well (described below).
the predicate is described using the language specified below. the symbols are based on those used by the C(1) and awk(1) languages.
Boolean Connectives
&& (and), || (or), ! (not), () (precedence overriding)
Number comparators
< , <= , > , >= , == , !=
String comparators
== , !=
String/Pattern comparators
~ (string matches pattern) , !~ (string does not match pattern)
Reserved variables
uid(user id; type integer)uname(user name; type string)gid(group id; type integer)gname(group name; type string)fname(process file name; type string)psargs(process file name with args; type string)cpuburn(cpu utilization; type float)iodemand(I/O demand - Kbytes read/written per second; type float)ctxswitch(number of context switches per second; type float)syscalls(number of system calls per second; type float)virtualsize(virtual size in Kbytes; type float)residentsize(resident size in Kbytes; type float)iowait(blocked and raw io wait in secs/sec; type float)schedwait(time waiting in run queue in secs/sec; type float)
Literal values
1234 (positive integer), 0.35 (positive float), "foobar" (string; delimited by "), /[fF](o)+bar/ (pattern; delimited by /), true (boolean), false (boolean)
Comments
#this is a comment (from # to the end of the line).
Examples
cpuburn > 0.2 # cpu utilization of more than 20%
cpuburn > 0.2 && uname == "root"
cpuburn > 0.2 && (uname == "root" || uname == "hot")
psargs ~ /pmda/ && cpuburn > 0.4
the hotproc.predicate metrics may be used to see what the values of the reserved variables are that were used by the predicate at the last refresh. they do not cover the reserved variables which are already exported elsewhere. a hotproc.predicate metric may not have a value if it is not referenced in the configuration predicate. π
π DYNAMIC CONFIGURATION π
the hot process metrics can also be configured at runtime through the pmstore(1) interface (and, implicitly, the pmStore(3) API)
Examples
pmstore hotproc.control.config 'fname == "mingetty"'
pmstore hotproc.control.config 'uid == 0'
to force the config file to be reloaded:
pmstore hotproc.control.reload_config "1"
π ACCESS CONFIGURATION π
access to per-process metrics is controlled by several factors.
when using automatically authenticating local connections, such as through the "unix:" or "local:" style context, then client tools will have full access to these metrics as if sampling the metrics directly as the user running the client tool.
when using pmcd with remote, authenticated clients it is possible to specify a set of user names that are allowed access to the process metrics.
a configuration file $PCP_SYSCONF_DIR/proc/access.conf can be used to fine-tune this behaviour, and it supports two keywords:
allowedβ a comma-separated list of authenticated user names that will be allowed access to per-process metrics. sampling is performed as therootuser.mappedβ a boolean value, when true indicating that authenticated user names will be mapped to local system user account names (this requires a one-to-one user name mapping between the account and the SASL-based authenticated user name enforced bypmcd(1)). sampling is performed as that local user.
π¦ INSTALLATION π¦
the proc PMDA is installed and available by default. if you want to undo the installation, do the following as root:
# cd $PCP_PMDAS_DIR/proc
# ./Remove
if you want to establish access to the names, help text and values for the proc performance metrics once more, after removal, do the following as root:
# cd $PCP_PMDAS_DIR/proc
# ./Install
pmdaproc is launched by pmcd(1) and should never be executed directly. the Install and Remove scripts notify pmcd(1) when the agent is installed or removed. don't be a rebel bestie, let pmcd drive π
π FILES π
$PCP_PMCDCONF_PATHβ command line options used to launchpmdaproc$PCP_PMDAS_DIR/proc/helpβ default help text file for theprocmetrics$PCP_PMDAS_DIR/proc/Installβ installation script for thepmdaprocagent$PCP_PMDAS_DIR/proc/Removeβ undo installation script for thepmdaprocagent$PCP_LOG_DIR/pmcd/proc.logβ default log file for error messages and other information frompmdaproc$PCP_PMDAS_DIR/proc/samplehotproc.confβ simple sample hotproc configuration$PCP_PMDAS_DIR/proc/hotproc.confβ default hotproc configuration file$PCP_SYSCONF_DIR/proc/access.confβ default access control configuration file
β 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).
β¨ DEBUGGING OPTIONS β¨
okay so when things get weird and you need the tea β on what pmdaproc is actually doing, bestie, there's a whole debug mode for that.
The -D or --debug option turns on extra diagnostics dumped to stderr to help you triage problems. lowkey it's giving cryptic sometimes, and it's mostly meant to guide developers rather than end-users, but it's still super useful when you're deep in the weeds. π΅οΈββοΈ
debug is a comma separated list of debugging options β so you can stack them like your fave lip gloss π. Use pmdbg(1) with the -l option to get the full list of available debugging options and what they mean.
Debugging options specific to pmdaproc are as follows:
appl0β cgroup handling ποΈappl1β refresh processing, including hotproc metrics π₯appl2β PMNS operations πappl3β process accounting metrics π
πΈ SEE ALSO πΈ
go read these next, bestie, they're literally the friend group of this man page:
and that's the whole vibe, no cap. this page came from Performance Co-Pilot / PCP and it's the PMDAPROC(1) manual β periodt π β¨ stay iconic, and may your processes always be accounted for π«Άπ
π¦ 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
- 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.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 stonking: pcp 7.2.1-2build1
- Copyright (c) 2014-2017 Red Hat
- Copyright (c) 2015 Martins Innus. All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms