iostat(1)
Report CPU and input/output statistics for devices and partitions.
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
| Flag | What it does |
|---|---|
-c | Show CPU utilization only |
-d | Show device utilization only (default when interval is specified) |
-x | Show extended I/O statistics (includes await, svctm, util %) |
-p | Show statistics for block devices and their partitions |
-m | Display statistics in megabytes per second instead of blocks |
-t | Print timestamp for each report |
-y | Omit first report (since boot), start with delta from interval |
-z | Omit devices with no I/O activity |
-N | Display registered device mapper devices |
-j ID | Display persistent device names by ID type (NAME, MAJMIN, PATH, UUID, PARTUUID) |
Examples
Show CPU and all device I/O statistics since system boot
iostatReport I/O statistics every 2 seconds for 5 iterations
iostat 2 5Show extended disk statistics (await, svctm, %util) every 1 second
iostat -x 1Display CPU utilization only, updated every 1 second for 10 reports
iostat -c 1 10Show device I/O in MB/sec, refreshed every 3 seconds
iostat -d -m 3Report partition statistics with timestamps every 2 seconds indefinitely
iostat -p -t 2 0Show extended stats skipping boot report, display first 20 lines of continuous stream
iostat -dx -y 1 | head -20