{
    "mode": "man",
    "parameter": "IOSTAT",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/IOSTAT/1/json",
    "generated": "2026-07-05T23:50:15Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "iostat  - Report Central Processing Unit (CPU) statistics and input/output statistics for de‐\nvices and partitions.\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "iostat [ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -s ] [ -t ] [ -V ] [ -x ] [ -y ] [  -z  ]  [",
                    "content": "--dec={  0  | 1 | 2 } ] [ { -f | +f } directory ] [ -j { ID | LABEL | PATH | UUID | ... } ] ["
                },
                {
                    "name": "-o -H -g --human --pretty -p",
                    "content": "device [...] | ALL ] [ interval [ count ] ]\n\n",
                    "flag": "-p",
                    "long": "--pretty"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The iostat command is used for monitoring system input/output device loading by observing the\ntime the devices are active in relation to their average transfer rates. The  iostat  command\ngenerates  reports  that can be used to change system configuration to better balance the in‐\nput/output load between physical disks.\n\nThe first report generated by the iostat command  provides  statistics  concerning  the  time\nsince the system was booted, unless the -y option is used (in this case, this first report is\nomitted).  Each subsequent report covers the time since the previous report.  All  statistics\nare  reported  each  time  the iostat command is run. The report consists of a CPU header row\nfollowed by a row of CPU statistics. On multiprocessor systems, CPU statistics are calculated\nsystem-wide  as averages among all processors. A device header row is displayed followed by a\nline of statistics for each device that is configured.\n\nThe interval parameter specifies the amount of time in seconds between each report. The count\nparameter can be specified in conjunction with the interval parameter. If the count parameter\nis specified, the value of count determines the number of reports generated at interval  sec‐\nonds  apart.  If  the interval parameter is specified without the count parameter, the iostat\ncommand generates reports continuously.\n\n",
            "subsections": []
        },
        "REPORTS": {
            "content": "The iostat command generates two types of reports, the CPU Utilization report and the  Device\nUtilization report.\n\n\nCPU Utilization Report\nThe  first  report  generated by the iostat command is the CPU Utilization Report. For\nmultiprocessor systems, the CPU values are global averages among all processors.   The\nreport has the following format:\n\n%user  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%system\nShow  the  percentage  of  CPU utilization that occurred while executing at the\nsystem level (kernel).\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%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%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\nDevice Utilization Report\nThe  second  report  generated by the iostat command is the Device Utilization Report.\nThe device report provides statistics on a per physical  device  or  partition  basis.\nBlock  devices  and partitions for which statistics are to be displayed may be entered\non the command line.  If no device nor partition is entered, then statistics are  dis‐\nplayed  for  every  device used by the system, and providing that the kernel maintains\nstatistics for it.  If the ALL keyword is given on the command line,  then  statistics\nare  displayed for every device defined by the system, including those that have never\nbeen used.  Transfer rates are shown in 1K blocks by default, unless  the  environment\nvariable  POSIXLYCORRECT  is set, in which case 512-byte blocks are used.  The report\nmay show the following fields, depending on the flags used (e.g.  -x,  -s  and  -k  or\n-m):\n\nDevice:\nThis  column  gives the device (or partition) name as listed in the /dev direc‐\ntory.\n\ntps    Indicate the number of transfers per second that were issued to the  device.  A\ntransfer is an I/O request to the device. Multiple logical requests can be com‐\nbined into a single I/O request to the device. A transfer is  of  indeterminate\nsize.\n\nBlkread/s (kBread/s, MBread/s)\nIndicate  the  amount  of  data  read  from the device expressed in a number of\nblocks (kilobytes, megabytes) per second. Blocks are equivalent to sectors  and\ntherefore have a size of 512 bytes.\n\nBlkwrtn/s (kBwrtn/s, MBwrtn/s)\nIndicate  the  amount  of  data  written to the device expressed in a number of\nblocks (kilobytes, megabytes) per second.\n\nBlkdscd/s (kBdscd/s, MBdscd/s)\nIndicate the amount of data discarded for the device expressed in a  number  of\nblocks (kilobytes, megabytes) per second.\n\nBlkw+d/s (kBw+d/s, MBw+d/s)\nIndicate the amount of data written to or discarded for the device expressed in\na number of blocks (kilobytes, megabytes) per second.\n\nBlkread (kBread, MBread)\nThe total number of blocks (kilobytes, megabytes) read.\n\nBlkwrtn (kBwrtn, MBwrtn)\nThe total number of blocks (kilobytes, megabytes) written.\n\nBlkdscd (kBdscd, MBdscd)\nThe total number of blocks (kilobytes, megabytes) discarded.\n\nBlkw+d (kBw+d, MBw+d)\nThe total number of blocks (kilobytes, megabytes) written or discarded.\n\nr/s    The number (after merges) of read requests completed per second for the device.\n\nw/s    The number (after merges) of write requests completed per second  for  the  de‐\nvice.\n\nd/s    The  number (after merges) of discard requests completed per second for the de‐\nvice.\n\nf/s    The number (after merges) of flush requests completed per second  for  the  de‐\nvice.   This  counts  flush  requests executed by disks. Flush requests are not\ntracked for partitions.  Before being merged, flush operations are  counted  as\nwrites.\n\nsec/s (kB/s, MB/s)\nThe number of sectors (kilobytes, megabytes) read from, written to or discarded\nfor the device per second.\n\nrsec/s (rkB/s, rMB/s)\nThe number of sectors (kilobytes, megabytes) read from the device per second.\n\nwsec/s (wkB/s, wMB/s)\nThe number of sectors (kilobytes, megabytes) written to the device per second.\n\ndsec/s (dkB/s, dMB/s)\nThe number of sectors (kilobytes, megabytes) discarded for the device per  sec‐\nond.\n\nrqm/s  The number of I/O requests merged per second that were queued to the device.\n\nrrqm/s The number of read requests merged per second that were queued to the device.\n\nwrqm/s The number of write requests merged per second that were queued to the device.\n\ndrqm/s The  number  of  discard requests merged per second that were queued to the de‐\nvice.\n\n%rrqm  The percentage of read requests merged together before being sent  to  the  de‐\nvice.\n\n%wrqm  The  percentage  of write requests merged together before being sent to the de‐\nvice.\n\n%drqm  The percentage of discard requests merged together before being sent to the de‐\nvice.\n\nareq-sz\nThe average size (in kilobytes) of the I/O requests that were issued to the de‐\nvice.\nNote: In previous versions, this field was known as avgrq-sz and was  expressed\nin sectors.\n\nrareq-sz\nThe  average  size  (in kilobytes) of the read requests that were issued to the\ndevice.\n\nwareq-sz\nThe average size (in kilobytes) of the write requests that were issued  to  the\ndevice.\n\ndareq-sz\nThe average size (in kilobytes) of the discard requests that were issued to the\ndevice.\n\nawait  The average time (in milliseconds) for I/O requests issued to the device to  be\nserved.  This  includes  the  time  spent by the requests in queue and the time\nspent servicing them.\n\nrawait\nThe average time (in milliseconds) for read requests issued to the device to be\nserved.  This  includes  the  time  spent by the requests in queue and the time\nspent servicing them.\n\nwawait\nThe average time (in milliseconds) for write requests issued to the  device  to\nbe  served.  This includes the time spent by the requests in queue and the time\nspent servicing them.\n\ndawait\nThe average time (in milliseconds) for discard requests issued to the device to\nbe  served.  This includes the time spent by the requests in queue and the time\nspent servicing them.\n\nfawait\nThe average time (in milliseconds) for flush requests issued to the  device  to\nbe served.  The block layer combines flush requests and executes at most one at\na time.  Thus flush operations could be twice as long: Wait for  current  flush\nrequest, then execute it, then wait for the next one.\n\naqu-sz The average queue length of the requests that were issued to the device.\nNote: In previous versions, this field was known as avgqu-sz.\n\n%util  Percentage  of elapsed time during which I/O requests were issued to the device\n(bandwidth utilization for the device).  Device  saturation  occurs  when  this\nvalue  is close to 100% for devices serving requests serially.  But for devices\nserving requests in parallel, such as RAID arrays and modern SSDs, this  number\ndoes not reflect their performance limits.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-c",
                    "content": "",
                    "flag": "-c"
                },
                {
                    "name": "-d",
                    "content": "",
                    "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": "-f",
                    "content": "+f directory\nSpecify  an  alternative  directory  for  iostat to read devices statistics. Option -f\ntells iostat to use only the files located in the alternative directory,  whereas  op‐\ntion  +f  tells  it to use both the standard kernel files and the files located in the\nalternative directory to read device statistics.\n\ndirectory is a directory containing files  with  statistics  for  devices  managed  in\nuserspace.  It may contain:\n\n- a \"diskstats\" file whose format is compliant with that located in \"/proc\",\n-  statistics for individual devices contained in files whose format is compliant with\nthat of files located in \"/sys\".\n\nIn particular, the following files located in directory may be used by iostat:\n\ndirectory/block/device/stat\ndirectory/block/device/partition/stat\n\npartition files must have an entry in directory/dev/block/ directory, e.g.:\n\ndirectory/dev/block/major:minor --> ../../block/device/partition\n",
                    "flag": "-f"
                },
                {
                    "name": "-g",
                    "content": "Display statistics for a group of devices.  The iostat command reports statistics  for\neach individual device in the list then a line of global statistics for the group dis‐\nplayed as groupname and made up of all the devices in the list. The ALL keyword means\nthat all the block devices defined by the system shall be included in the group.\n",
                    "flag": "-g"
                },
                {
                    "name": "-H -g",
                    "content": "the group are to be displayed, and not statistics for individual devices in the group.\n",
                    "flag": "-g"
                },
                {
                    "name": "-h --human --pretty",
                    "content": "",
                    "flag": "-h",
                    "long": "--pretty"
                },
                {
                    "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": "-j",
                    "content": "Display persistent device names. Keywords ID, LABEL, etc. specify the type of the per‐\nsistent name. These keywords are not limited, only prerequisite is that directory with\nrequired persistent names is present in /dev/disk.  Optionally, multiple  devices  can\nbe  specified in the chosen persistent name type.  Because persistent device names are\nusually long, option --pretty is implicitly set with this option.\n",
                    "flag": "-j"
                },
                {
                    "name": "-k",
                    "content": "",
                    "flag": "-k"
                },
                {
                    "name": "-m",
                    "content": "",
                    "flag": "-m"
                },
                {
                    "name": "-N",
                    "content": "viewing LVM2 statistics.\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": "Display statistics for block devices and all their partitions that  are  used  by  the\nsystem.   If  a device name is entered on the command line, then statistics for it and\nall its partitions are displayed. Last, the ALL keyword indicates that statistics have\nto  be  displayed  for all the block devices and partitions defined by the system, in‐\ncluding those that have never been used. If option -j is defined before  this  option,\ndevices  entered  on the command line can be specified with the chosen persistent name\ntype.\n",
                    "flag": "-p"
                },
                {
                    "name": "--pretty",
                    "content": "Make the Device Utilization Report easier to read by a human.\n",
                    "long": "--pretty"
                },
                {
                    "name": "-s",
                    "content": "screens.\n",
                    "flag": "-s"
                },
                {
                    "name": "-t",
                    "content": "of the STIMEFORMAT environment variable (see below).\n",
                    "flag": "-t"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                },
                {
                    "name": "-x",
                    "content": "",
                    "flag": "-x"
                },
                {
                    "name": "-y",
                    "content": "given interval.\n",
                    "flag": "-y"
                },
                {
                    "name": "-z",
                    "content": "sample period.\n\n",
                    "flag": "-z"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "The iostat command takes into account the following environment variables:\n\nPOSIXLYCORRECT\nWhen this variable is set, transfer rates are shown in 512-byte blocks instead of  the\ndefault 1K blocks.\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 device names.\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 iostat command will use the ISO 8601\nformat (YYYY-MM-DD) instead.  The timestamp displayed with option -t will also be com‐\npliant with ISO 8601 format.\n\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "iostat Display a single history since boot report for all CPU and Devices.\n",
            "subsections": [
                {
                    "name": "iostat -d 2",
                    "content": "Display a continuous device report at two second intervals.\n"
                },
                {
                    "name": "iostat -d 2 6",
                    "content": "Display six reports at two second intervals for all devices.\n"
                },
                {
                    "name": "iostat -x sda sdb 2 6",
                    "content": "Display six reports of extended statistics at two second intervals for devices sda and\nsdb.\n"
                },
                {
                    "name": "iostat -p sda 2 6",
                    "content": "Display six reports at two second intervals for device  sda  and  all  its  partitions\n(sda1, etc.)\n\n"
                }
            ]
        },
        "BUGS": {
            "content": "/proc filesystem must be mounted for iostat to work.\n\nKernels older than 2.6.x are no longer supported.\n\nAlthough  iostat  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/stat contains system statistics.\n/proc/uptime contains system uptime.\n/proc/diskstats contains disks statistics.\n/sys contains statistics for block devices.\n/proc/self/mountstats contains statistics for network filesystems.\n/dev/disk contains persistent device names.\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Sebastien Godard (sysstat <at> orange.fr)\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "sar(1), pidstat(1), mpstat(1), vmstat(8), tapestat(1), nfsiostat(1), cifsiostat(1)\n\nhttps://github.com/sysstat/sysstat\nhttp://pagesperso-orange.fr/sebastien.godard/\n\n\n\nLinux                                       OCTOBER 2020                                   IOSTAT(1)",
            "subsections": []
        }
    },
    "summary": "iostat  - Report Central Processing Unit (CPU) statistics and input/output statistics for de‐ vices and partitions.",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--dec",
            "arg": "{",
            "description": "Specify the number of decimal places to use (0 to 2, default value is 2)."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "+f directory Specify an alternative directory for iostat to read devices statistics. Option -f tells iostat to use only the files located in the alternative directory, whereas op‐ tion +f tells it to use both the standard kernel files and the files located in the alternative directory to read device statistics. directory is a directory containing files with statistics for devices managed in userspace. It may contain: - a \"diskstats\" file whose format is compliant with that located in \"/proc\", - statistics for individual devices contained in files whose format is compliant with that of files located in \"/sys\". In particular, the following files located in directory may be used by iostat: directory/block/device/stat directory/block/device/partition/stat partition files must have an entry in directory/dev/block/ directory, e.g.: directory/dev/block/major:minor --> ../../block/device/partition"
        },
        {
            "flag": "-g",
            "long": null,
            "arg": null,
            "description": "Display statistics for a group of devices. The iostat command reports statistics for each individual device in the list then a line of global statistics for the group dis‐ played as groupname and made up of all the devices in the list. The ALL keyword means that all the block devices defined by the system shall be included in the group."
        },
        {
            "flag": "-g",
            "long": null,
            "arg": null,
            "description": "the group are to be displayed, and not statistics for individual devices in the group."
        },
        {
            "flag": "-h",
            "long": "--pretty",
            "arg": null,
            "description": ""
        },
        {
            "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": "-j",
            "long": null,
            "arg": null,
            "description": "Display persistent device names. Keywords ID, LABEL, etc. specify the type of the per‐ sistent name. These keywords are not limited, only prerequisite is that directory with required persistent names is present in /dev/disk. Optionally, multiple devices can be specified in the chosen persistent name type. Because persistent device names are usually long, option --pretty is implicitly set with this option."
        },
        {
            "flag": "-k",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-m",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-N",
            "long": null,
            "arg": null,
            "description": "viewing LVM2 statistics."
        },
        {
            "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": "Display statistics for block devices and all their partitions that are used by the system. If a device name is entered on the command line, then statistics for it and all its partitions are displayed. Last, the ALL keyword indicates that statistics have to be displayed for all the block devices and partitions defined by the system, in‐ cluding those that have never been used. If option -j is defined before this option, devices entered on the command line can be specified with the chosen persistent name type."
        },
        {
            "flag": "",
            "long": "--pretty",
            "arg": null,
            "description": "Make the Device Utilization Report easier to read by a human."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "screens."
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "of the STIMEFORMAT environment variable (see below)."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-y",
            "long": null,
            "arg": null,
            "description": "given interval."
        },
        {
            "flag": "-z",
            "long": null,
            "arg": null,
            "description": "sample period."
        }
    ],
    "examples": [
        "iostat Display a single history since boot report for all CPU and Devices.",
        "Display a continuous device report at two second intervals.",
        "Display six reports at two second intervals for all devices.",
        "Display six reports of extended statistics at two second intervals for devices sda and",
        "sdb.",
        "Display six reports at two second intervals for device  sda  and  all  its  partitions",
        "(sda1, etc.)"
    ],
    "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": "mpstat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mpstat/1/json"
        },
        {
            "name": "vmstat",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/vmstat/8/json"
        },
        {
            "name": "tapestat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/tapestat/1/json"
        },
        {
            "name": "nfsiostat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/nfsiostat/1/json"
        },
        {
            "name": "cifsiostat",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/cifsiostat/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Report statistics for devices and partitions.",
        "examples": [
            {
                "description": "Display a report of CPU and disk statistics since system startup",
                "command": "iostat"
            },
            {
                "description": "Display a report of CPU and disk statistics with units converted to megabytes",
                "command": "iostat -m"
            },
            {
                "description": "Display CPU statistics",
                "command": "iostat {{-c|--compact}}"
            },
            {
                "description": "Display disk statistics with disk names (including LVM)",
                "command": "iostat -N"
            },
            {
                "description": "Display extended disk statistics with disk names for device \"sda\"",
                "command": "iostat -xN {{sda}}"
            },
            {
                "description": "Display incremental reports of CPU and disk statistics every 2 seconds",
                "command": "iostat {{2}}"
            }
        ]
    }
}