info > pidstat(1)

Not found locally for pidstat. Try Google search

๐Ÿ“‹ NAME

pidstat - Report statistics for Linux tasks.

๐Ÿš€ Quick Reference

Use CaseCommandDescription
๐Ÿ“Š Monitor CPU usage of all active tasks every 2 seconds, 5 reportspidstat 2 5Display five reports of CPU statistics for every active task at 2-second intervals.
๐Ÿ–ฅ๏ธ Memory & page faults for a specific PIDpidstat -r -p 1643 2 5Display five reports of page faults and memory statistics for PID 1643.
๐Ÿ” Filter processes by name patternpidstat -C "fox|bird" -r -p ALLDisplay global page faults and memory statistics for processes with command name containing "fox" or "bird".
๐Ÿ‘ถ Monitor child processes of all taskspidstat -T CHILD -r 2 5Display five reports of page faults statistics for child processes of all tasks.
โšก Real-time continuous monitoringpidstat -p ALL 1Continuously report statistics for all tasks every second.
๐Ÿ“‹ I/O statisticspidstat -dReport I/O statistics (disk read/write per second).
๐Ÿ”„ Context switchingpidstat -wReport voluntary and involuntary context switches per second.
๐Ÿ”ข Stack utilizationpidstat -sReport stack size and referenced stack memory.

๐Ÿ“– SYNOPSIS

pidstat  [ -d ] [ -H ] [ -h ] [ -I ] [ -l ] [ -R ] [ -r ] [ -s ] [ -t ]
       [ -U [ username ] ] [ -u ] [ -V ] [ -v ] [ -w  ]  [  -C  comm  ]  [  -G
       process_name  ] [ --dec={ 0 | 1 | 2 } ] [ --human ] [ -p { pid[,...]  |
       SELF | ALL } ] [ -T { TASK | CHILD | ALL } ] [ interval [ count ]  ]  [
       -e program args ]

๐Ÿ“ DESCRIPTION

The pidstat command is used for monitoring individual tasks currently being managed by the Linux kernel. It writes to standard output activities for every task selected with option -p or for every task managed by the Linux kernel if option -p ALL has been used. Not selecting any tasks is equivalent to specifying -p ALL but only active tasks (tasks with non-zero statistics values) will appear in the report.

The pidstat command can also be used for monitoring the child processes of selected tasks. Read about option -T below.

The interval parameter specifies the amount of time in seconds between each report. A value of 0 (or no parameters at all) indicates that tasks statistics are to be reported for the time since system startup (boot). The count parameter can be specified in conjunction with the interval parameter if this one is not set to zero. The value of count determines the number of reports generated at interval seconds apart. If the interval parameter is specified without the count parameter, the pidstat command generates reports continuously.

You can select information about specific task activities using flags. Not specifying any flags selects only CPU activity.

โš™๏ธ OPTIONS

๐ŸŽฏ -C comm

Display only tasks whose command name includes the string comm. This string can be a regular expression.

๐Ÿ’พ -d โ€” Report I/O statistics

Kernels 2.6.20 and later only. The following values may be displayed:

๐Ÿ”ข --dec={ 0 | 1 | 2 }

Specify the number of decimal places to use (0 to 2, default is 2).

๐Ÿš€ -e program args

Execute program with given arguments args and monitor it with pidstat. pidstat stops when program terminates.

๐Ÿ” -G process_name

Display only processes whose command name includes the string process_name. This string can be a regular expression. If option -t is used together with -G, then the threads belonging to that process are also displayed (even if their command name doesn't include the string).

โฑ๏ธ -H

Display timestamp in seconds since the epoch.

๐Ÿ“Š -h

Display all activities horizontally on a single line, with no average statistics at the end. Intended for easier parsing by other programs.

๐Ÿ‘ค --human

Print sizes in human readable format (e.g., 1.0k, 1.2M, etc.). Units supersede any other default units (e.g., kilobytes, sectors).

๐Ÿงฎ -I

In an SMP environment, indicate that tasks CPU usage (as displayed by option -u) should be divided by the total number of processors.

๐Ÿ“‹ -l

Display the process command name and all its arguments.

๐ŸŽฏ -p { pid[,...] | SELF | ALL }

Select tasks (processes) for which statistics are to be reported. pid is the process identification number. SELF indicates statistics for the pidstat process itself. ALL indicates statistics for all tasks managed by the system.

โฒ๏ธ -R โ€” Report realtime priority and scheduling policy

The following values may be displayed:

๐Ÿง  -r โ€” Report page faults and memory utilization

When reporting statistics for individual tasks, the following values may be displayed:

When reporting global statistics for tasks and all their children, the following values may be displayed:

๐Ÿ“ฆ -s โ€” Report stack utilization

The following values may be displayed:

๐Ÿ‘ถ -T { TASK | CHILD | ALL }

Specifies what to monitor. TASK (default) reports statistics for individual tasks. CHILD reports globally for selected tasks and all their children. ALL reports both individual and global statistics. Note: Global statistics for children are collected only when a child finishes or is killed.

๐Ÿงต -t โ€” Also display statistics for threads

Adds the following values to reports:

๐Ÿ‘ค -U [ username ]

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

๐Ÿ’ป -u โ€” Report CPU utilization

When reporting for individual tasks:

When reporting global statistics for tasks and children:

โ„น๏ธ -V

Print version number then exit.

๐Ÿ“ -v โ€” Report values of some kernel tables

The following values may be displayed:

๐Ÿ”„ -w โ€” Report task switching activity

Kernels 2.6.23 and later only. The following values may be displayed:

๐ŸŒ ENVIRONMENT

The pidstat command takes into account the following environment variables:

๐ŸŽจ S_COLORS

By default statistics are displayed in color when output is connected to a terminal. Use this variable to change settings. Possible values: never, always, or auto (default). Note: The color used is not indicative of any issue; it only indicates different ranges of values.

๐ŸŒˆ S_COLORS_SGR

Specify colors and other attributes for terminal display. Value is a colon-separated list of capabilities, defaulting to H=31;1:I=32;22:M=35;1:N=34;1:Z=34;22. Supported capabilities:

โฐ S_TIME_FORMAT

If this variable exists and its value is ISO, the current locale will be ignored when printing the date in the report header. The pidstat command will use ISO 8601 format (YYYY-MM-DD) instead. The timestamp will also be compliant with ISO 8601 format.

๐Ÿ’ก EXAMPLES

pidstat 2 5

Display five reports of CPU statistics for every active task in the system at two second intervals.

pidstat -r -p 1643 2 5

Display five reports of page faults and memory statistics for PID 1643 at two second intervals.

pidstat -C "fox|bird" -r -p ALL

Display global page faults and memory statistics for all processes whose command name includes the string "fox" or "bird".

pidstat -T CHILD -r 2 5

Display five reports of page faults statistics at two second intervals for the child processes of all tasks in the system. Only child processes with non-zero statistics values are displayed.

๐Ÿ› BUGS

/proc filesystem must be mounted for the pidstat command to work.

Although pidstat speaks of kilobytes (kB), megabytes (MB)..., it actually uses kibibytes (kiB), mebibytes (MiB)... A kibibyte is equal to 1024 bytes, and a mebibyte is equal to 1024 kibibytes.

๐Ÿ“ FILES

/proc contains various files with system statistics.

โœ๏ธ AUTHOR

Sebastien Godard (sysstat <at> orange.fr)

๐Ÿ“š SEE ALSO

sar(1), top(1), ps(1), mpstat(1), iostat(1), vmstat(8)

https://github.com/sysstat/sysstat
http://pagesperso-orange.fr/sebastien.godard/

pidstat(1)
๐Ÿ“‹ NAME ๐Ÿš€ Quick Reference ๐Ÿ“– SYNOPSIS ๐Ÿ“ DESCRIPTION โš™๏ธ OPTIONS
๐ŸŽฏ -C comm ๐Ÿ’พ -d โ€” Report I/O statistics ๐Ÿ”ข --dec={ 0 | 1 | 2 } ๐Ÿš€ -e program args ๐Ÿ” -G process_name โฑ๏ธ -H ๐Ÿ“Š -h ๐Ÿ‘ค --human ๐Ÿงฎ -I ๐Ÿ“‹ -l ๐ŸŽฏ -p { pid[,...] | SELF | ALL } โฒ๏ธ -R โ€” Report realtime priority and scheduling policy ๐Ÿง  -r โ€” Report page faults and memory utilization ๐Ÿ“ฆ -s โ€” Report stack utilization ๐Ÿ‘ถ -T { TASK | CHILD | ALL } ๐Ÿงต -t โ€” Also display statistics for threads ๐Ÿ‘ค -U [ username ] ๐Ÿ’ป -u โ€” Report CPU utilization โ„น๏ธ -V ๐Ÿ“ -v โ€” Report values of some kernel tables ๐Ÿ”„ -w โ€” Report task switching activity
๐ŸŒ ENVIRONMENT
๐ŸŽจ S_COLORS ๐ŸŒˆ S_COLORS_SGR โฐ S_TIME_FORMAT
๐Ÿ’ก EXAMPLES ๐Ÿ› BUGS ๐Ÿ“ FILES โœ๏ธ AUTHOR ๐Ÿ“š SEE ALSO

Generated by phpman v4.10.0-7-g98e9fd5 Author: Che Dong Under GNU General Public License
2026-09-10 21:02 @2600:1f28:365:80b0:2634:f534:c836:dc5e
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!