PMDAPROC(1) | General Commands Manual | PMDAPROC(1) |
pmdaproc - process performance metrics domain agent (PMDA)
$PCP_PMDAS_DIR/proc/pmdaproc [-AL] [-d domain] [-l logfile] [-r cgroup] [-U username]
pmdaproc is a Performance Metrics Domain Agent (PMDA) which extracts performance metrics describing the state of the individual processes running on a Linux system.
The proc PMDA exports metrics that measure the memory, processor and other resource use of each process, as well as summary information collated across all of the running processes. The PMDA uses credentials passed from the PMAPI(3) monitoring tool identifying the user requesting the information, to ensure that only values the user is allowed to access are returned by the PMDA. This involves the PMDA temporarily changing its effective user and group identifiers for the duration of requests for instances and values. In other words, system calls to extract information are performed as the user originating the request and not as a privileged user. The mechanisms available for transfer of user credentials are described further in the PCPIntro(1) page.
A brief description of the pmdaproc command line options follows:
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 cpuburn metric which specifies the CPU utilization of the process over the refresh interval, total metrics which indicate how much of the available CPU time the "interesting" processes account for, predicate metrics which show the values of the reserved variables (see below) that are being used in the hotproc predicate, and control metrics for controlling the agent.
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.
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.
The hot metrics can also be configured at runtime through the pmstore(1) interface (and, implicitly, the pmStore(3) API)
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.
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).
PCPIntro(1), pmcd(1), pmstore(1), seteuid(2), setegid(2), PMAPI(3), pcp.conf(5) and pcp.env(5).
PCP | Performance Co-Pilot |