{
    "mode": "man",
    "parameter": "mpstat",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/mpstat/1/json",
    "generated": "2026-06-12T15:29:39Z",
    "synopsis": "mpstat  [ -A ] [ --dec={ 0 | 1 | 2 } ] [ -n ] [ -u ] [ -T ] [ -V ] [ -I { keyword[,...] | ALL\n} ] [ -N { nodelist | ALL } ] [ -o JSON ] [ -P { cpulist | ALL } ] [ interval [ count ] ]",
    "sections": {
        "NAME": {
            "content": "mpstat - Report processors related statistics.\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "mpstat  [ -A ] [ --dec={ 0 | 1 | 2 } ] [ -n ] [ -u ] [ -T ] [ -V ] [ -I { keyword[,...] | ALL\n} ] [ -N { nodelist | ALL } ] [ -o JSON ] [ -P { cpulist | ALL } ] [ interval [ count ] ]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The mpstat command writes to standard output activities for each available processor, proces‐\nsor 0 being the first one.  Global average activities among all processors are also reported.\nThe mpstat command can be used on both SMP and UP machines, but in the  latter,  only  global\naverage activities will be printed. If no activity has been selected, then the default report\nis the CPU utilization report.\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 processors statistics are to be reported for\nthe time since system startup (boot). The count parameter can  be  specified  in  conjunction\nwith the interval parameter if this one is not set to zero. The value of count determines the\nnumber of reports generated at interval seconds apart. If the interval parameter is specified\nwithout the count parameter, the mpstat command generates reports continuously.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-A -n -u -I",
                    "content": "fying -N ALL -P ALL unless these options are explicitly set on the command line.\n",
                    "flag": "-I"
                },
                {
                    "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": "-I",
                    "content": "Report interrupts statistics.  Possible keywords are CPU, SCPU, and SUM.\n\nWith the CPU keyword, the number of each individual interrupt received per  second  by\nthe CPU or CPUs is displayed. Interrupts are those listed in /proc/interrupts file.\n\nWith  the  SCPU keyword, the number of each individual software interrupt received per\nsecond by the CPU or CPUs is displayed. This option works only with kernels 2.6.31 and\nlater. Software interrupts are those listed in /proc/softirqs file.\n\nWith  the  SUM  keyword, the mpstat command reports the total number of interrupts per\nprocessor.  The following values are displayed:\n\n\nCPU    Processor number. The keyword all indicates that statistics are  calculated  as\naverages among all processors.\n\n\nintr/s Show the total number of interrupts received per second by the CPU or CPUs.\n\nThe  ALL  keyword is equivalent to specifying all the keywords above and therefore all\nthe interrupts statistics are displayed.\n",
                    "flag": "-I"
                },
                {
                    "name": "-N",
                    "content": "Indicate the NUMA nodes for which statistics are to be reported.  nodelist is a  list\nof  comma-separated  values or range of values (e.g., 0,2,4-7,12-). Note that node all\nis the global average among all nodes. The ALL keyword indicates that  statistics  are\nto be reported for all nodes.\n",
                    "flag": "-N"
                },
                {
                    "name": "-n",
                    "content": "displayed:\n\nNODE   Logical NUMA node number. The keyword all indicates that statistics are  calcu‐\nlated as averages among all nodes.\n\nAll the other fields are the same as those displayed with option -u (see below).\n",
                    "flag": "-n"
                },
                {
                    "name": "-o JSON",
                    "content": "Display the statistics in JSON (Javascript Object Notation) format.  JSON output field\norder is undefined, and new fields may be added in the future.\n",
                    "flag": "-o",
                    "arg": "JSON"
                },
                {
                    "name": "-P",
                    "content": "Indicate the processors for which statistics are to be reported.  cpulist is  a  list\nof comma-separated values or range of values (e.g., 0,2,4-7,12-).  Note that processor\n0 is the first processor, and processor all is the global average  among  all  proces‐\nsors.   The  ALL  keyword indicates that statistics are to be reported for all proces‐\nsors.  Offline processors are not displayed.\n",
                    "flag": "-P"
                },
                {
                    "name": "-T -u",
                    "content": "ments are displayed:\n\nCORE   Logical core number.\n\nSOCK   Logical socket number.\n\nNODE   Logical NUMA node number.\n",
                    "flag": "-u"
                },
                {
                    "name": "-u",
                    "content": "CPU    Processor  number.  The keyword all indicates that statistics are calculated as\naverages among all processors.\n\n%usr   Show the percentage of CPU utilization that occurred  while  executing  at  the\nuser level (application).\n\n%nice  Show  the  percentage  of  CPU utilization that occurred while executing at the\nuser level with nice priority.\n\n%sys   Show the percentage of CPU utilization that occurred  while  executing  at  the\nsystem  level  (kernel).  Note  that this does not include time spent servicing\nhardware and software interrupts.\n\n%iowait\nShow the percentage of time that the CPU or CPUs were  idle  during  which  the\nsystem had an outstanding disk I/O request.\n\n%irq   Show the percentage of time spent by the CPU or CPUs to service hardware inter‐\nrupts.\n\n%soft  Show the percentage of time spent by the CPU or CPUs to service software inter‐\nrupts.\n\n%steal Show  the  percentage  of  time spent in involuntary wait by the virtual CPU or\nCPUs while the hypervisor was servicing another virtual processor.\n\n%guest Show the percentage of time spent by the CPU or CPUs to run a  virtual  proces‐\nsor.\n\n%gnice Show the percentage of time spent by the CPU or CPUs to run a niced guest.\n\n%idle  Show  the  percentage of time that the CPU or CPUs were idle and the system did\nnot have an outstanding disk I/O request.\n",
                    "flag": "-u"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "The mpstat command takes into account the following environment variable:\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 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.\n\nZ=     SGR substring for zero values.\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 mpstat 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": "mpstat 2 5",
                    "content": "Display five reports of global statistics among all processors at  two  second  inter‐\nvals.\n"
                },
                {
                    "name": "mpstat -P ALL 2 5",
                    "content": "Display five reports of statistics for all processors at two second intervals.\n\n"
                }
            ]
        },
        "BUGS": {
            "content": "/proc filesystem must be mounted for the mpstat command to work.\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), pidstat(1), iostat(1), vmstat(8)\n\nhttps://github.com/sysstat/sysstat\nhttp://pagesperso-orange.fr/sebastien.godard/\n\n\n\nLinux                                        AUGUST 2020                                   MPSTAT(1)",
            "subsections": []
        }
    },
    "summary": "mpstat - Report processors related statistics.",
    "flags": [
        {
            "flag": "-I",
            "long": null,
            "arg": null,
            "description": "fying -N ALL -P ALL unless these options are explicitly set on the command line."
        },
        {
            "flag": "",
            "long": "--dec",
            "arg": "{",
            "description": "Specify the number of decimal places to use (0 to 2, default value is 2)."
        },
        {
            "flag": "-I",
            "long": null,
            "arg": null,
            "description": "Report interrupts statistics. Possible keywords are CPU, SCPU, and SUM. With the CPU keyword, the number of each individual interrupt received per second by the CPU or CPUs is displayed. Interrupts are those listed in /proc/interrupts file. With the SCPU keyword, the number of each individual software interrupt received per second by the CPU or CPUs is displayed. This option works only with kernels 2.6.31 and later. Software interrupts are those listed in /proc/softirqs file. With the SUM keyword, the mpstat command reports the total number of interrupts per processor. The following values are displayed: CPU Processor number. The keyword all indicates that statistics are calculated as averages among all processors. intr/s Show the total number of interrupts received per second by the CPU or CPUs. The ALL keyword is equivalent to specifying all the keywords above and therefore all the interrupts statistics are displayed."
        },
        {
            "flag": "-N",
            "long": null,
            "arg": null,
            "description": "Indicate the NUMA nodes for which statistics are to be reported. nodelist is a list of comma-separated values or range of values (e.g., 0,2,4-7,12-). Note that node all is the global average among all nodes. The ALL keyword indicates that statistics are to be reported for all nodes."
        },
        {
            "flag": "-n",
            "long": null,
            "arg": null,
            "description": "displayed: NODE Logical NUMA node number. The keyword all indicates that statistics are calcu‐ lated as averages among all nodes. All the other fields are the same as those displayed with option -u (see below)."
        },
        {
            "flag": "-o",
            "long": null,
            "arg": "JSON",
            "description": "Display the statistics in JSON (Javascript Object Notation) format. JSON output field order is undefined, and new fields may be added in the future."
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": "Indicate the processors for which statistics are to be reported. cpulist is a list of comma-separated values or range of values (e.g., 0,2,4-7,12-). Note that processor 0 is the first processor, and processor all is the global average among all proces‐ sors. The ALL keyword indicates that statistics are to be reported for all proces‐ sors. Offline processors are not displayed."
        },
        {
            "flag": "-u",
            "long": null,
            "arg": null,
            "description": "ments are displayed: CORE Logical core number. SOCK Logical socket number. NODE Logical NUMA node number."
        },
        {
            "flag": "-u",
            "long": null,
            "arg": null,
            "description": "CPU Processor number. The keyword all indicates that statistics are calculated as averages among all processors. %usr Show the percentage of CPU utilization that occurred while executing at the user level (application). %nice Show the percentage of CPU utilization that occurred while executing at the user level with nice priority. %sys Show the percentage of CPU utilization that occurred while executing at the system level (kernel). Note that this does not include time spent servicing hardware and software interrupts. %iowait Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request. %irq Show the percentage of time spent by the CPU or CPUs to service hardware inter‐ rupts. %soft Show the percentage of time spent by the CPU or CPUs to service software inter‐ rupts. %steal Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor. %guest Show the percentage of time spent by the CPU or CPUs to run a virtual proces‐ sor. %gnice Show the percentage of time spent by the CPU or CPUs to run a niced guest. %idle Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [
        "Display five reports of global statistics among all processors at  two  second  inter‐",
        "vals.",
        "Display five reports of statistics for all processors at two second intervals."
    ],
    "see_also": [
        {
            "name": "sar",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sar/1/json"
        },
        {
            "name": "pidstat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pidstat/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"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Report CPU statistics.",
        "examples": [
            {
                "description": "Display CPU statistics every 2 seconds",
                "command": "mpstat {{2}}"
            },
            {
                "description": "Display 5 reports, one by one, at 2 second intervals",
                "command": "mpstat {{2}} {{5}}"
            },
            {
                "description": "Display 5 reports, one by one, from a given processor, at 2 second intervals",
                "command": "mpstat -P {{0}} {{2}} {{5}}"
            }
        ]
    }
}