iostat Command Guide for CPU and Disk IO Statistics
iostat reports CPU and input/output (disk) statistics per device — and its single most important column is %util, which tells you how busy each disk actually is.
What is iostat?, and Why Use It?
iostat is part of the sysstat package and answers one focused question: what are my disks (and my CPU) doing? For each block device it prints throughput, IOPS, wait times, and utilization — the numbers that tell you whether a “slow server” is really a slow disk.
It complements vmstat, which sees disk activity only as anonymous blocks-in/blocks-out totals. iostat breaks that down per device (sda, nvme0n1, …), so when vmstat shouts “disk is busy”, iostat tells you which disk and how busy — the difference between a failing drive and a database doing its job.
Why Learn iostat?
- It names the guilty device — on a multi-disk server, “the disk is slow” is useless;
sda at 99% utilis actionable. - It measures what matters for disks — service times (
await/r_await,w_await), IOPS, and throughput, not just vague block counts. - It is the standard answer to “is my disk the bottleneck?” —
%utilandaqu-szsettle arguments about storage performance instantly. - It ships with the OS on most distros — after a one-line package install (
sysstat), it works on every server you will ever SSH into.
“
%utilnear 100 means the device can’t keep up with the requests coming at it — that, not throughput alone, is the saturation signal.”
1. Run It and Read the Output
iostat
Linux 6.6.0 (server) 12/05/2026 _x86_64_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
5.20 0.00 3.10 1.40 0.00 90.30
Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 12.3 96.00 412.00 1234567 8901234
nvme0n1 88.0 512.00 220.00 4455667 7788990
Run bare, iostat prints two things: an avg-cpu block (CPU split since boot) and a per-device table (also averages since boot). Like the first row of vmstat, the bare output describes the whole uptime — useful for a quick overall picture, wrong for judging “right now”.
For a live view, pass an interval — and note the interval form prints repeated avg-cpu + device sections:
iostat 2
avg-cpu: %user %nice %system %iowait %steal %idle
7.10 0.00 4.20 2.30 0.00 86.40
Device r/s w/s rkB/s wkB/s rrqm/s ... %util
sda 120.00 340.00 960.00 4120.00 0.10 ... 61.20
nvme0n1 400.00 510.00 5120.00 2200.00 0.00 ... 33.80
2— print a fresh report every 2 seconds until Ctrl-C.
Column names differ by sysstat version (older: tps, kB_read/s; newer: r/s, rkB/s); the meanings below are the same.
2. The Extended View: -x
The default columns hide the most useful timing data. -x expands the report:
iostat -x 2
Device r/s w/s r_await w_await aqu-sz %util
sda 120.00 340.00 0.40 12.30 4.30 99.20
nvme0n1 400.00 510.00 0.10 0.20 0.30 33.80
| Column | Meaning |
|---|---|
r/s, w/s | Read/writes per second (IOPS) |
rkB/s, wkB/s | Read/write throughput in KiB per second |
r_await, w_await | Average wait per IO, in milliseconds — latency you feel as slowness |
aqu-sz (older: avgqu-sz) | Average queue depth — how many requests are waiting |
%util | Fraction of elapsed time the device had at least one request in flight |
Read it like a doctor: sda answers 460 requests/second, each write waits ~12 ms, 4 requests queue up on average, and the device is busy 99% of the time. That disk is saturated. nvme0n1 by contrast is fast and relaxed.
3. Judge Saturation Correctly
%util is the headline number, but it needs care:
# Watch only the extended device stats, 1-second refresh
iostat -x 1
- Spinning disk (HDD/SATA):
%utilnear 100 really does mean saturated — one request at a time is the device’s nature. - NVMe/SSD: these handle many requests in parallel, so a device can show 100% util while barely breaking a sweat. Judge NVMe by
r_await/w_awaitand queue depth instead — 0.1 ms latency at 100% util is fine. - Sustained
awaitin the tens of milliseconds on an SSD (or hundreds on an HDD) plus a queue > 1 is the real “disk is your bottleneck” signal.
Cross-check the symptom from the other side: if vmstat shows a rising wa (IO wait) column, iostat -x should show the device responsible.
4. Show Only What You Care About
Servers have many devices (sda, sdb, nvme0n1p1, …). Filter to one:
# Stats for sda only, every second
iostat -x sda 1
# Exclude the noisy loop devices
iostat -x -pLoop 1
Other common filters and flags:
| Command | What it does |
|---|---|
iostat -c 1 | CPU stats only, no device table |
iostat -d 1 | Device stats only, no CPU block |
iostat -p ALL 1 | Also report per-partition stats (e.g., sda1) |
iostat -h 1 | Human-readable units (MB/s instead of kB/s) where supported |
5. Use It When a Backup or Build Feels Slow
A concrete workflow — “the nightly backup crawls; is the disk the problem?”:
# Terminal 1: watch the disk live
iostat -x 2
If during the backup wkB/s climbs but %util stays at 30% with w_await under 1 ms, the disk is not the bottleneck — look at the network or the backup tool. If instead w_await spikes to 50 ms and aqu-sz climbs above 4, the disk is drowning: either the workload exceeds the hardware, or the device is failing (check health with smartctl, not iostat).
Pair the finding with dmesg — a dying disk shows up in the kernel log with IO errors long before tools report latency.
Common Pitfalls
- Running bare
iostatfor a live check — without an interval it prints boot-time averages; you wantiostat -x 1. - Reading
%utilalone on NVMe — parallel devices can be 100% busy and fast; trustawaitand queue depth on SSDs. - Confusing throughput with saturation — a device moving lots of MB/s at low latency is healthy; the problem signal is high
awaitwith a growing queue. - Blaming the disk for everything — high
wkB/sduring a legitimate backup is normal;iostatsays the disk is busy, not that anything is wrong. - Forgetting
iostatneedssysstat— on a minimal install it is not there yet; install the package first (see the Packages section).
Related Pages
| Page | Relationship |
|---|---|
| vmstat | System-wide IO summary — the “is disk involved?” first pass |
| free | Memory health — swap thrash and disk slowness feel alike |
| dmesg | Kernel log — where failing disks announce themselves |
| journalctl | Systemd logs — IO errors from services |
| df | Disk space — a different disk question entirely |
iostat Cheatsheet
| Command | What it does |
|---|---|
iostat | CPU + per-device averages since boot |
iostat -x 1 | The everyday command: extended stats, refreshed every second |
iostat -x sda 1 | One device only, live |
iostat -c 1 / iostat -d 1 | CPU-only or devices-only report |
iostat -p ALL 1 | Include per-partition rows |
%util | Percent of time the device had work in flight (HDD: saturation signal) |
r_await / w_await | Average IO latency in ms — the real slowness measure |
aqu-sz | Average queue depth — sustained values above 1 on a busy disk mean backlog |