When to use iostat
Use iostat to investigate CPU and device I/O trends over repeated samples. Interpret throughput, latency and queueing together; one utilization number does not describe every storage device or virtualized workload.
Syntax
iostat [PARAMETERS] [INTERVAL [NUMBER]]Square brackets mark optional arguments; an ellipsis means repetition. Replace example file names, user names and server addresses with your own values.
Common options and arguments
Usage examples
View summary
iostatThe initial report commonly reflects cumulative statistics since boot.
Collect five disk statistics intervals
iostat -x -y 1 5Extended interval reports are collected while omitting the initial since-boot sample.
Display device statistics
iostat -d 2 3Device reports are sampled over a bounded interval.
Notes and limitations
- iostat is usually included in the sysstat package, which may require separate installation.
- Evaluate latency and queue along with storage type; high util is not interpreted equally for all devices and arrays.
Common questions and troubleshooting
Why is the first report different from later samples?
The initial report often covers time since boot, while later reports cover each interval. Use the appropriate option when interval data is required.
Does high utilization always mean the disk is saturated?
Not for every storage type. Parallel devices and virtual storage need interpretation alongside latency, throughput, queue depth and workload.
Further help
Options vary by version and distribution. Check the installed documentation with this command: man iostat.