Linux "iostat" Command Line Options and Examples
Report Central Processing Unit

The iostat command is used for monitoring system input/output device loading by observing the time the devices are active in relation to their average transfer rates. The iostat command generates reports that can be used to change system configuration to better bal‐ ance the input/output load between physical disks.


Usage:

iostat [ -c ] [ -d ] [ -h ] [ -k | -m ] [ -N ] [ -s ] [ -t ] [ -V ] [ -x ] [ -y ] [ -z ] [ -j { ID | LABEL | PATH | UUID | ... } ] [
-o JSON ] [ [ -H ] -g group_name ] [ --human ] [ -p [ device [,...] | ALL ] ] [ device [...] | ALL ] [ interval [ count ] ]






Command Line Options:

-c
Display the CPU utilization report.
iostat -c ...
-d
Display the device utilization report.
iostat -d ...
-g
Display statistics for a group of devices. The iostat command reports statistics for each individual device in the list thena line of global statistics for the group displayed as group_name and made up of all the devices in the list. The ALL keywordmeans that all the block devices defined by the system shall be included in the group.
iostat -g ...
-h
Make the Device Utilization Report easier to read by a human. --human is enabled implicitly with this option.
iostat -h ...
--human
Print sizes in human readable format (e.g. 1k, 1.23M, etc.) The units displayed with this option supersede any other defaultunits (e.g. kilobytes, sectors...) associated with the metrics.
iostat --human ...
-j
Display persistent device names. Options ID, LABEL, etc. specify the type of the persistent name. These options are not lim‐ited, only prerequisite is that directory with required persistent names is present in /dev/disk. Optionally, multipledevices can be specified in the chosen persistent name type. Because persistent device names are usually long, option
iostat -j ...
-k
Display statistics in kilobytes per second.
iostat -k ...
-m
Display statistics in megabytes per second.
iostat -m ...
-N
Display the registered device mapper names for any device mapper devices. Useful for viewing LVM2 statistics.
iostat -N ...
-o
Display the statistics in JSON (Javascript Object Notation) format. JSON output field order is undefined, and new fields maybe added in the future.
iostat -o ...
-p
The -p option displays statistics for block devices and all their partitions that are used by the system. If a device name isentered on the command line, then statistics for it and all its partitions are displayed. Last, the ALL keyword indicates thatstatistics have to be displayed for all the block devices and partitions defined by the system, including those that havenever been used. If option -j is defined before this option, devices entered on the command line can be specified with thechosen persistent name type.
iostat -p ...
-s
Display a short (narrow) version of the report that should fit in 80 characters wide screens.
iostat -s ...
-V
Print version number then exit.
iostat -V ...
-x
Display extended statistics.
iostat -x ...
-y
Omit first report with statistics since system boot, if displaying multiple records at given interval.
iostat -y ...