{
    "content": [
        {
            "type": "text",
            "text": "# pidstat (man)\n\n## NAME\n\npidstat - Report statistics for Linux tasks.\n\n## SYNOPSIS\n\npidstat  [ -d ] [ -H ] [ -h ] [ -I ] [ -l ] [ -R ] [ -r ] [ -s ] [ -t ] [ -U [ username ] ] [\n\n## DESCRIPTION\n\nThe pidstat command is used for monitoring individual tasks currently being  managed  by  the\nLinux kernel.  It writes to standard output activities for every task selected with option -p\nor for every task managed by the Linux kernel if option -p ALL has been used.  Not  selecting\nany  tasks is equivalent to specifying -p ALL but only active tasks (tasks with non-zero sta‐\ntistics values) will appear in the report.\n\n## TLDR\n\n> Show system resource usage, including CPU, memory, IO etc.\n\n- Show CPU statistics at a 2 second interval for 10 times:\n  `pidstat {{2}} {{10}}`\n- Show page faults and memory utilization:\n  `pidstat -r`\n- Show input/output usage per process ID:\n  `pidstat -d`\n- Show information on a specific PID:\n  `pidstat -p {{pid}}`\n- Show memory statistics for all processes whose command name include \"fox\" or \"bird\":\n  `pidstat -C \"{{fox|bird}}\" -r -p ALL`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS** (1 subsections)\n- **DESCRIPTION**\n- **OPTIONS** (21 subsections)\n- **ENVIRONMENT**\n- **EXAMPLES** (4 subsections)\n- **BUGS**\n- **FILES**\n- **AUTHOR**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pidstat",
        "section": "",
        "mode": "man",
        "summary": "pidstat - Report statistics for Linux tasks.",
        "synopsis": "pidstat  [ -d ] [ -H ] [ -h ] [ -I ] [ -l ] [ -R ] [ -r ] [ -s ] [ -t ] [ -U [ username ] ] [",
        "tldr_summary": "Show system resource usage, including CPU, memory, IO etc.",
        "tldr_examples": [
            {
                "description": "Show CPU statistics at a 2 second interval for 10 times",
                "command": "pidstat {{2}} {{10}}"
            },
            {
                "description": "Show page faults and memory utilization",
                "command": "pidstat -r"
            },
            {
                "description": "Show input/output usage per process ID",
                "command": "pidstat -d"
            },
            {
                "description": "Show information on a specific PID",
                "command": "pidstat -p {{pid}}"
            },
            {
                "description": "Show memory statistics for all processes whose command name include \"fox\" or \"bird\"",
                "command": "pidstat -C \"{{fox|bird}}\" -r -p ALL"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": "Display only tasks whose command name includes the string comm. This string can be a regular expression."
            },
            {
                "flag": "-d",
                "long": null,
                "arg": null,
                "description": "displayed: UID The real user identification number of the task being monitored. USER The name of the real user owning the task being monitored. PID The identification number of the task being monitored. kBrd/s Number of kilobytes the task has caused to be read from disk per second. kBwr/s Number of kilobytes the task has caused, or shall cause to be written to disk per second. kBccwr/s Number of kilobytes whose writing to disk has been cancelled by the task. This may occur when the task truncates some dirty pagecache. In this case, some IO which another task has been accounted for will not be happening. iodelay Block I/O delay of the task being monitored, measured in clock ticks. This met‐ ric includes the delays spent waiting for sync block I/O completion and for swapin block I/O completion. Command The command name of the task."
            },
            {
                "flag": "",
                "long": "--dec",
                "arg": "{",
                "description": "Specify the number of decimal places to use (0 to 2, default value is 2)."
            },
            {
                "flag": "-e",
                "long": null,
                "arg": null,
                "description": "Execute program with given arguments args and monitor it with pidstat. pidstat stops when program terminates."
            },
            {
                "flag": "-G",
                "long": null,
                "arg": null,
                "description": "Display only processes whose command name includes the string processname. This string can be a regular expression. If option -t is used together with option -G then the threads belonging to that process are also displayed (even if their command name doesn't include the string processname)."
            },
            {
                "flag": "-H",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "the end of the report. This is intended to make it easier to be parsed by other pro‐ grams."
            },
            {
                "flag": "",
                "long": "--human",
                "arg": null,
                "description": "Print sizes in human readable format (e.g. 1.0k, 1.2M, etc.) The units displayed with this option supersede any other default units (e.g. kilobytes, sectors...) associated with the metrics."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "should be divided by the total number of processors."
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "Select tasks (processes) for which statistics are to be reported. pid is the process identification number. The SELF keyword indicates that statistics are to be reported for the pidstat process itself, whereas the ALL keyword indicates that statistics are to be reported for all the tasks managed by the system."
            },
            {
                "flag": "-R",
                "long": null,
                "arg": null,
                "description": "be displayed: UID The real user identification number of the task being monitored. USER The name of the real user owning the task being monitored. PID The identification number of the task being monitored. prio The realtime priority of the task being monitored. policy The scheduling policy of the task being monitored. Command The command name of the task."
            },
            {
                "flag": "-r",
                "long": null,
                "arg": null,
                "description": "When reporting statistics for individual tasks, the following values may be displayed: UID The real user identification number of the task being monitored. USER The name of the real user owning the task being monitored. PID The identification number of the task being monitored. minflt/s Total number of minor faults the task has made per second, those which have not required loading a memory page from disk. majflt/s Total number of major faults the task has made per second, those which have re‐ quired loading a memory page from disk. VSZ Virtual Size: The virtual memory usage of entire task in kilobytes. RSS Resident Set Size: The non-swapped physical memory used by the task in kilo‐ bytes. %MEM The tasks's currently used share of available physical memory. Command The command name of the task. When reporting global statistics for tasks and all their children, the following val‐ ues may be displayed: UID The real user identification number of the task which is being monitored to‐ gether with its children. USER The name of the real user owning the task which is being monitored together with its children. PID The identification number of the task which is being monitored together with its children. minflt-nr Total number of minor faults made by the task and all its children, and col‐ lected during the interval of time. majflt-nr Total number of major faults made by the task and all its children, and col‐ lected during the interval of time. Command The command name of the task which is being monitored together with its chil‐ dren."
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": "UID The real user identification number of the task being monitored. USER The name of the real user owning the task being monitored. PID The identification number of the task being monitored. StkSize The amount of memory in kilobytes reserved for the task as stack, but not nec‐ essarily used. StkRef The amount of memory in kilobytes used as stack, referenced by the task. Command The command name of the task."
            },
            {
                "flag": "-T",
                "long": null,
                "arg": "ALL",
                "description": "This option specifies what has to be monitored by the pidstat command. The TASK key‐ word indicates that statistics are to be reported for individual tasks (this is the default option) whereas the CHILD keyword indicates that statistics are to be globally reported for the selected tasks and all their children. The ALL keyword indicates that statistics are to be reported for individual tasks and globally for the selected tasks and their children. Note: Global statistics for tasks and all their children are not available for all op‐ tions of pidstat. Also these statistics are not necessarily relevant to current time interval: The statistics of a child process are collected only when it finishes or it is killed."
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "This option adds the following values to the reports: TGID The identification number of the thread group leader. TID The identification number of the thread being monitored."
            },
            {
                "flag": "-U",
                "long": null,
                "arg": null,
                "description": "Display the real user name of the tasks being monitored instead of the UID. If user‐ name is specified, then only tasks belonging to the specified user are displayed."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "When reporting statistics for individual tasks, the following values may be displayed: UID The real user identification number of the task being monitored. USER The name of the real user owning the task being monitored. PID The identification number of the task being monitored. %usr Percentage of CPU used by the task while executing at the user level (applica‐ tion), with or without nice priority. Note that this field does NOT include time spent running a virtual processor. %system Percentage of CPU used by the task while executing at the system level (ker‐ nel). %guest Percentage of CPU spent by the task in virtual machine (running a virtual pro‐ cessor). %wait Percentage of CPU spent by the task while waiting to run. %CPU Total percentage of CPU time used by the task. In an SMP environment, the task's CPU usage will be divided by the total number of CPU's if option -I has been entered on the command line. CPU Processor number to which the task is attached. Command The command name of the task. When reporting global statistics for tasks and all their children, the following val‐ ues may be displayed: UID The real user identification number of the task which is being monitored to‐ gether with its children. USER The name of the real user owning the task which is being monitored together with its children. PID The identification number of the task which is being monitored together with its children. usr-ms Total number of milliseconds spent by the task and all its children while exe‐ cuting at the user level (application), with or without nice priority, and col‐ lected during the interval of time. Note that this field does NOT include time spent running a virtual processor. system-ms Total number of milliseconds spent by the task and all its children while exe‐ cuting at the system level (kernel), and collected during the interval of time. guest-ms Total number of milliseconds spent by the task and all its children in virtual machine (running a virtual processor). Command The command name of the task which is being monitored together with its chil‐ dren."
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "UID The real user identification number of the task being monitored. USER The name of the real user owning the task being monitored. PID The identification number of the task being monitored. threads Number of threads associated with current task. fd-nr Number of file descriptors associated with current task. Command The command name of the task."
            },
            {
                "flag": "-w",
                "long": null,
                "arg": null,
                "description": "may be displayed: UID The real user identification number of the task being monitored. USER The name of the real user owning the task being monitored. PID The identification number of the task being monitored. cswch/s Total number of voluntary context switches the task made per second. A volun‐ tary context switch occurs when a task blocks because it requires a resource that is unavailable. nvcswch/s Total number of non voluntary context switches the task made per second. A in‐ voluntary context switch takes place when a task executes for the duration of its time slice and then is forced to relinquish the processor. Command The command name of the task."
            }
        ],
        "examples": [
            "Display five reports of CPU statistics for every active task in the system at two sec‐",
            "ond intervals.",
            "Display  five  reports of page faults and memory statistics for PID 1643 at two second",
            "intervals.",
            "Display global page faults and memory statistics for all the processes  whose  command",
            "name includes the string \"fox\" or \"bird\".",
            "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."
        ],
        "see_also": [
            {
                "name": "sar",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/sar/1/json"
            },
            {
                "name": "top",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/top/1/json"
            },
            {
                "name": "ps",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ps/1/json"
            },
            {
                "name": "mpstat",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/mpstat/1/json"
            },
            {
                "name": "iostat",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/iostat/1/json"
            },
            {
                "name": "vmstat",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/vmstat/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-u -V -v -w -C -G --dec={ --human",
                        "lines": 4,
                        "flag": "-G",
                        "long": "--human",
                        "arg": "{"
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-C",
                        "lines": 3,
                        "flag": "-C"
                    },
                    {
                        "name": "-d",
                        "lines": 28,
                        "flag": "-d"
                    },
                    {
                        "name": "--dec={ 0 | 1 | 2 }",
                        "lines": 2,
                        "long": "--dec",
                        "arg": "{"
                    },
                    {
                        "name": "-e",
                        "lines": 3,
                        "flag": "-e"
                    },
                    {
                        "name": "-G",
                        "lines": 5,
                        "flag": "-G"
                    },
                    {
                        "name": "-H",
                        "lines": 1,
                        "flag": "-H"
                    },
                    {
                        "name": "-h",
                        "lines": 3,
                        "flag": "-h"
                    },
                    {
                        "name": "--human",
                        "lines": 4,
                        "long": "--human"
                    },
                    {
                        "name": "-I -u",
                        "lines": 2,
                        "flag": "-u"
                    },
                    {
                        "name": "-l",
                        "lines": 1,
                        "flag": "-l"
                    },
                    {
                        "name": "-p",
                        "lines": 5,
                        "flag": "-p"
                    },
                    {
                        "name": "-R",
                        "lines": 15,
                        "flag": "-R"
                    },
                    {
                        "name": "-r",
                        "lines": 50,
                        "flag": "-r"
                    },
                    {
                        "name": "-s",
                        "lines": 15,
                        "flag": "-s"
                    },
                    {
                        "name": "-T { TASK | CHILD | ALL }",
                        "lines": 12,
                        "flag": "-T",
                        "arg": "ALL"
                    },
                    {
                        "name": "-t",
                        "lines": 6,
                        "flag": "-t"
                    },
                    {
                        "name": "-U",
                        "lines": 3,
                        "flag": "-U"
                    },
                    {
                        "name": "-u",
                        "lines": 59,
                        "flag": "-u"
                    },
                    {
                        "name": "-V",
                        "lines": 1,
                        "flag": "-V"
                    },
                    {
                        "name": "-v",
                        "lines": 14,
                        "flag": "-v"
                    },
                    {
                        "name": "-w",
                        "lines": 22,
                        "flag": "-w"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 33,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "pidstat 2 5",
                        "lines": 3
                    },
                    {
                        "name": "pidstat -r -p 1643 2 5",
                        "lines": 3
                    },
                    {
                        "name": "pidstat -C \"fox|bird\" -r -p ALL",
                        "lines": 3
                    },
                    {
                        "name": "pidstat -T CHILD -r 2 5",
                        "lines": 5
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pidstat - Report statistics for Linux tasks.\n\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pidstat  [ -d ] [ -H ] [ -h ] [ -I ] [ -l ] [ -R ] [ -r ] [ -s ] [ -t ] [ -U [ username ] ] [",
                "subsections": [
                    {
                        "name": "-u -V -v -w -C -G --dec={ --human",
                        "content": "[  -p { pid[,...]  | SELF | ALL } ] [ -T { TASK | CHILD | ALL } ] [ interval [ count ] ] [ -e\nprogram args ]\n\n",
                        "flag": "-G",
                        "long": "--human",
                        "arg": "{"
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "The pidstat command is used for monitoring individual tasks currently being  managed  by  the\nLinux kernel.  It writes to standard output activities for every task selected with option -p\nor for every task managed by the Linux kernel if option -p ALL has been used.  Not  selecting\nany  tasks is equivalent to specifying -p ALL but only active tasks (tasks with non-zero sta‐\ntistics values) will appear in the report.\n\nThe pidstat command can also be used for monitoring the child processes  of  selected  tasks.\nRead about option -T below.\n\nThe  interval parameter specifies the amount of time in seconds between each report.  A value\nof 0 (or no parameters at all) indicates that tasks statistics are to  be  reported  for  the\ntime  since  system  startup (boot). The count parameter can be specified in conjunction with\nthe interval parameter if this one is not set to zero. The value of count determines the num‐\nber  of  reports  generated at interval seconds apart. If the interval parameter is specified\nwithout the count parameter, the pidstat command generates reports continuously.\n\nYou can select information about specific task activities using flags.   Not  specifying  any\nflags selects only CPU activity.\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-C",
                        "content": "Display  only  tasks whose command name includes the string comm. This string can be a\nregular expression.\n",
                        "flag": "-C"
                    },
                    {
                        "name": "-d",
                        "content": "displayed:\n\nUID    The real user identification number of the task being monitored.\n\nUSER   The name of the real user owning the task being monitored.\n\nPID    The identification number of the task being monitored.\n\nkBrd/s\nNumber of kilobytes the task has caused to be read from disk per second.\n\nkBwr/s\nNumber  of  kilobytes the task has caused, or shall cause to be written to disk\nper second.\n\nkBccwr/s\nNumber of kilobytes whose writing to disk has been cancelled by the task.  This\nmay  occur  when the task truncates some dirty pagecache. In this case, some IO\nwhich another task has been accounted for will not be happening.\n\niodelay\nBlock I/O delay of the task being monitored, measured in clock ticks. This met‐\nric  includes  the  delays  spent waiting for sync block I/O completion and for\nswapin block I/O completion.\n\nCommand\nThe command name of the task.\n",
                        "flag": "-d"
                    },
                    {
                        "name": "--dec={ 0 | 1 | 2 }",
                        "content": "Specify the number of decimal places to use (0 to 2, default value is 2).\n",
                        "long": "--dec",
                        "arg": "{"
                    },
                    {
                        "name": "-e",
                        "content": "Execute program with given arguments args and monitor it with pidstat.  pidstat  stops\nwhen program terminates.\n",
                        "flag": "-e"
                    },
                    {
                        "name": "-G",
                        "content": "Display  only  processes  whose  command  name includes the string processname.  This\nstring can be a regular expression. If option -t is used together with option -G  then\nthe  threads  belonging to that process are also displayed (even if their command name\ndoesn't include the string processname).\n",
                        "flag": "-G"
                    },
                    {
                        "name": "-H",
                        "content": "",
                        "flag": "-H"
                    },
                    {
                        "name": "-h",
                        "content": "the  end  of the report. This is intended to make it easier to be parsed by other pro‐\ngrams.\n",
                        "flag": "-h"
                    },
                    {
                        "name": "--human",
                        "content": "Print sizes in human readable format (e.g. 1.0k, 1.2M, etc.)  The units displayed with\nthis option supersede any other default units (e.g.  kilobytes, sectors...) associated\nwith the metrics.\n",
                        "long": "--human"
                    },
                    {
                        "name": "-I -u",
                        "content": "should be divided by the total number of processors.\n",
                        "flag": "-u"
                    },
                    {
                        "name": "-l",
                        "content": "",
                        "flag": "-l"
                    },
                    {
                        "name": "-p",
                        "content": "Select  tasks (processes) for which statistics are to be reported.  pid is the process\nidentification number. The SELF keyword indicates that statistics are to  be  reported\nfor  the pidstat process itself, whereas the ALL keyword indicates that statistics are\nto be reported for all the tasks managed by the system.\n",
                        "flag": "-p"
                    },
                    {
                        "name": "-R",
                        "content": "be displayed:\n\nUID    The real user identification number of the task being monitored.\n\nUSER   The name of the real user owning the task being monitored.\n\nPID    The identification number of the task being monitored.\n\nprio   The realtime priority of the task being monitored.\n\npolicy The scheduling policy of the task being monitored.\n\nCommand\nThe command name of the task.\n",
                        "flag": "-R"
                    },
                    {
                        "name": "-r",
                        "content": "When reporting statistics for individual tasks, the following values may be displayed:\n\nUID    The real user identification number of the task being monitored.\n\nUSER   The name of the real user owning the task being monitored.\n\nPID    The identification number of the task being monitored.\n\nminflt/s\nTotal number of minor faults the task has made per second, those which have not\nrequired loading a memory page from disk.\n\nmajflt/s\nTotal number of major faults the task has made per second, those which have re‐\nquired loading a memory page from disk.\n\nVSZ    Virtual Size: The virtual memory usage of entire task in kilobytes.\n\nRSS    Resident  Set  Size:  The non-swapped physical memory used by the task in kilo‐\nbytes.\n\n%MEM   The tasks's currently used share of available physical memory.\n\nCommand\nThe command name of the task.\n\nWhen reporting global statistics for tasks and all their children, the following  val‐\nues may be displayed:\n\nUID    The  real  user  identification number of the task which is being monitored to‐\ngether with its children.\n\nUSER   The name of the real user owning the task which  is  being  monitored  together\nwith its children.\n\nPID    The  identification  number  of the task which is being monitored together with\nits children.\n\nminflt-nr\nTotal number of minor faults made by the task and all its  children,  and  col‐\nlected during the interval of time.\n\nmajflt-nr\nTotal  number  of  major faults made by the task and all its children, and col‐\nlected during the interval of time.\n\nCommand\nThe command name of the task which is being monitored together with  its  chil‐\ndren.\n",
                        "flag": "-r"
                    },
                    {
                        "name": "-s",
                        "content": "UID    The real user identification number of the task being monitored.\n\nUSER   The name of the real user owning the task being monitored.\n\nPID    The identification number of the task being monitored.\n\nStkSize\nThe  amount of memory in kilobytes reserved for the task as stack, but not nec‐\nessarily used.\n\nStkRef The amount of memory in kilobytes used as stack, referenced by the task.\n\nCommand\nThe command name of the task.\n",
                        "flag": "-s"
                    },
                    {
                        "name": "-T { TASK | CHILD | ALL }",
                        "content": "This option specifies what has to be monitored by the pidstat command. The  TASK  key‐\nword  indicates  that  statistics are to be reported for individual tasks (this is the\ndefault option) whereas the CHILD keyword indicates that statistics are to be globally\nreported for the selected tasks and all their children. The ALL keyword indicates that\nstatistics are to be reported for individual tasks and globally for the selected tasks\nand their children.\n\nNote: Global statistics for tasks and all their children are not available for all op‐\ntions of pidstat.  Also these statistics are not necessarily relevant to current  time\ninterval:  The statistics of a child process are collected only when it finishes or it\nis killed.\n",
                        "flag": "-T",
                        "arg": "ALL"
                    },
                    {
                        "name": "-t",
                        "content": "This option adds the following values to the reports:\n\nTGID   The identification number of the thread group leader.\n\nTID    The identification number of the thread being monitored.\n",
                        "flag": "-t"
                    },
                    {
                        "name": "-U",
                        "content": "Display the real user name of the tasks being monitored instead of the UID.  If  user‐\nname is specified, then only tasks belonging to the specified user are displayed.\n",
                        "flag": "-U"
                    },
                    {
                        "name": "-u",
                        "content": "When reporting statistics for individual tasks, the following values may be displayed:\n\nUID    The real user identification number of the task being monitored.\n\nUSER   The name of the real user owning the task being monitored.\n\nPID    The identification number of the task being monitored.\n\n%usr   Percentage  of CPU used by the task while executing at the user level (applica‐\ntion), with or without nice priority. Note that this  field  does  NOT  include\ntime spent running a virtual processor.\n\n%system\nPercentage  of  CPU  used by the task while executing at the system level (ker‐\nnel).\n\n%guest Percentage of CPU spent by the task in virtual machine (running a virtual  pro‐\ncessor).\n\n%wait  Percentage of CPU spent by the task while waiting to run.\n\n%CPU   Total  percentage  of  CPU  time  used  by the task. In an SMP environment, the\ntask's CPU usage will be divided by the total number of CPU's if option -I  has\nbeen entered on the command line.\n\nCPU    Processor number to which the task is attached.\n\nCommand\nThe command name of the task.\n\nWhen  reporting global statistics for tasks and all their children, the following val‐\nues may be displayed:\n\nUID    The real user identification number of the task which is  being  monitored  to‐\ngether with its children.\n\nUSER   The  name  of  the  real user owning the task which is being monitored together\nwith its children.\n\nPID    The identification number of the task which is being  monitored  together  with\nits children.\n\nusr-ms Total  number of milliseconds spent by the task and all its children while exe‐\ncuting at the user level (application), with or without nice priority, and col‐\nlected  during the interval of time. Note that this field does NOT include time\nspent running a virtual processor.\n\nsystem-ms\nTotal number of milliseconds spent by the task and all its children while  exe‐\ncuting at the system level (kernel), and collected during the interval of time.\n\nguest-ms\nTotal  number of milliseconds spent by the task and all its children in virtual\nmachine (running a virtual processor).\n\nCommand\nThe command name of the task which is being monitored together with  its  chil‐\ndren.\n",
                        "flag": "-u"
                    },
                    {
                        "name": "-V",
                        "content": "",
                        "flag": "-V"
                    },
                    {
                        "name": "-v",
                        "content": "UID    The real user identification number of the task being monitored.\n\nUSER   The name of the real user owning the task being monitored.\n\nPID    The identification number of the task being monitored.\n\nthreads\nNumber of threads associated with current task.\n\nfd-nr  Number of file descriptors associated with current task.\n\nCommand\nThe command name of the task.\n",
                        "flag": "-v"
                    },
                    {
                        "name": "-w",
                        "content": "may be displayed:\n\nUID    The real user identification number of the task being monitored.\n\nUSER   The name of the real user owning the task being monitored.\n\nPID    The identification number of the task being monitored.\n\ncswch/s\nTotal number of voluntary context switches the task made per second.  A  volun‐\ntary  context  switch  occurs when a task blocks because it requires a resource\nthat is unavailable.\n\nnvcswch/s\nTotal number of non voluntary context switches the task made per second.  A in‐\nvoluntary  context  switch takes place when a task executes for the duration of\nits time slice and then is forced to relinquish the processor.\n\nCommand\nThe command name of the task.\n\n",
                        "flag": "-w"
                    }
                ]
            },
            "ENVIRONMENT": {
                "content": "The pidstat command takes into account the following environment variables:\n\nSCOLORS\nBy default statistics are displayed in color when the output is connected to a  termi‐\nnal.   Use this variable to change the settings. Possible values for this variable are\nnever, always or auto (the latter is equivalent to the default settings).\nPlease note that the color (being red, yellow, or some other color) used to display  a\nvalue  is not indicative of any kind of issue simply because of the color. It only in‐\ndicates different ranges of values.\n\nSCOLORSSGR\nSpecify the colors and other attributes used to display statistics  on  the  terminal.\nIts   value   is   a   colon-separated   list   of   capabilities   that  defaults  to\nH=31;1:I=32;22:M=35;1:N=34;1:Z=34;22.  Supported capabilities are:\n\nH=     SGR (Select Graphic Rendition) substring for percentage values greater than  or\nequal to 75%.\n\nI=     SGR substring for item values like PID, UID or CPU number.\n\nM=     SGR substring for percentage values in the range from 50% to 75%.\n\nN=     SGR substring for non-zero statistics values and for tasks names.\n\nZ=     SGR substring for zero values and for threads names.\n\nSTIMEFORMAT\nIf  this  variable exists and its value is ISO then the current locale will be ignored\nwhen printing the date in the report header. The pidstat command will use the ISO 8601\nformat  (YYYY-MM-DD) instead.  The timestamp will also be compliant with ISO 8601 for‐\nmat.\n\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "",
                "subsections": [
                    {
                        "name": "pidstat 2 5",
                        "content": "Display five reports of CPU statistics for every active task in the system at two sec‐\nond intervals.\n"
                    },
                    {
                        "name": "pidstat -r -p 1643 2 5",
                        "content": "Display  five  reports of page faults and memory statistics for PID 1643 at two second\nintervals.\n"
                    },
                    {
                        "name": "pidstat -C \"fox|bird\" -r -p ALL",
                        "content": "Display global page faults and memory statistics for all the processes  whose  command\nname includes the string \"fox\" or \"bird\".\n"
                    },
                    {
                        "name": "pidstat -T CHILD -r 2 5",
                        "content": "Display  five  reports of page faults statistics at two second intervals for the child\nprocesses of all tasks in the system. Only child processes  with  non-zero  statistics\nvalues are displayed.\n\n"
                    }
                ]
            },
            "BUGS": {
                "content": "/proc filesystem must be mounted for the pidstat command to work.\n\nAlthough  pidstat  speaks  of  kilobytes  (kB), megabytes (MB)..., it actually uses kibibytes\n(kiB), mebibytes (MiB)...  A kibibyte is equal to 1024 bytes, and a mebibyte is equal to 1024\nkibibytes.\n\n",
                "subsections": []
            },
            "FILES": {
                "content": "/proc contains various files with system statistics.\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Sebastien Godard (sysstat <at> orange.fr)\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "sar(1), top(1), ps(1), mpstat(1), iostat(1), vmstat(8)\n\nhttps://github.com/sysstat/sysstat\nhttp://pagesperso-orange.fr/sebastien.godard/\n\n\n\nLinux                                         JULY 2020                                   PIDSTAT(1)",
                "subsections": []
            }
        }
    }
}