$linuxjunkies
>

iostat(1)

Report CPU and input/output statistics for devices and partitions.

UbuntuDebianFedoraArch

Synopsis

iostat [options] [interval [count]]

Description

iostat reads kernel I/O statistics and displays CPU and device I/O usage. It helps identify I/O bottlenecks and monitor disk performance over time. Requires the sysstat package.

When run without arguments, it shows statistics since boot. With an interval, it reports updated statistics at regular intervals; optionally limited to a specific count of reports.

Common options

FlagWhat it does
-cShow CPU utilization only
-dShow device utilization only (default when interval is specified)
-xShow extended I/O statistics (includes await, svctm, util %)
-pShow statistics for block devices and their partitions
-mDisplay statistics in megabytes per second instead of blocks
-tPrint timestamp for each report
-yOmit first report (since boot), start with delta from interval
-zOmit devices with no I/O activity
-NDisplay registered device mapper devices
-j IDDisplay persistent device names by ID type (NAME, MAJMIN, PATH, UUID, PARTUUID)

Examples

Show CPU and all device I/O statistics since system boot

iostat

Report I/O statistics every 2 seconds for 5 iterations

iostat 2 5

Show extended disk statistics (await, svctm, %util) every 1 second

iostat -x 1

Display CPU utilization only, updated every 1 second for 10 reports

iostat -c 1 10

Show device I/O in MB/sec, refreshed every 3 seconds

iostat -d -m 3

Report partition statistics with timestamps every 2 seconds indefinitely

iostat -p -t 2 0

Show extended stats skipping boot report, display first 20 lines of continuous stream

iostat -dx -y 1 | head -20

Related commands