pcp-ps(1)

Report statistics for Linux Process.

Section 1 pcp bookworm source

Description

PCP-PS

NAME

pcp-ps - Report statistics for Linux Process.

SYNOPSIS

pcp [pcp options] ps [-e] [-U [username]] [-V --version] [-c Command name] [-P pid1,pid2..] [-p pid1,pid2..] [-o col1,col2... or ALL] [-Z timezone] [-z] [-?]

DESCRIPTION

The pcp-ps command is used for monitoring individual process running on the system. Using various options it helps a user to see useful information related to the processes. This information includes CPU percentage, memory and stack usage, scheduling and priority. By default pcp-ps reports live data for the local host.

OPTIONS

When invoked via the pcp(1) command, the -h/--host, -O/--origin, -t/--interval, -Z/--timezone and several other pcp options become indirectly available; refer to PCPIntro(1) for a complete description of these options.

The additional command line options available for pcp-ps are:

-e

Display all the process.

Image grohtml-79724-1.png

-c [command name]

Display the real Command name of the tasks being monitored instead of the UID. If command name is specified, then only tasks belonging to the specified command are displayed.

-U [username], --user-name[=username]

Display the real user name of the tasks being monitored instead of the UID. If username is specified, then only tasks belonging to the specified user are displayed.

-V, --version

Print version number then exit.

-p pid1,pid2.., --pid-list=pid1,pid2..

Display only processes with the listed PIDs.

-P ppid1,ppid2.., --ppid-list=ppid1,ppid2..

Display only processes with the listed PPIDs.

-o

User-defined format.

It is a single argument in the form of a blank-separated or comma-separated list, which offers a way to specify individual output columns.

The argument to -o are following:

Image grohtml-79724-2.png

STANDARD FORMAT SPECIFIERS

Here are the different keywords that may be used to control the output format (e.g. with option -o) or to sort the selected processes

For example: pcp-ps -o pid,user,args

Image grohtml-79724-3.png

-Z timezone, --timezone=timezone

By default, pcp-ps reports the time of day according to the local timezone on the system where pcp-ps is run. The -Z option changes the timezone to timezone in the format of the environment variable TZ as described in environ(7).

-z , --hostzone

Change the reporting timezone to the local timezone at the host that is the source of the performance metrics. When replaying a PCP archive that was captured in a foreign timezone, the -z option would almost always be used (the default reporting timezone is the local timezone, which may not be the same as the timezone of the PCP archive).

-? , --help

Display usage message and exit.

NOTES

pcp-ps is inspired by the ps(1) command and aims to be command line and output compatible with it.

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).

For environment variables affecting PCP tools, see pmGetOptions(3).

SEE ALSO

PCPIntro(1), pcp(1), pcp-ps(1), python(1), pmParseInterval(3), strftime(3) and environ(7).