The iostat command helps Linux and Unix operators quickly understand CPU usage and disk I/O behavior. If you troubleshoot slow applications, storage latency, or noisy hosts, this guide gives you practical commands and a repeatable workflow.
Originally published on 2015-12-12; fully revised and updated.

What iostat reports
iostat (part of the sysstat package on Linux) reports two main categories:
- CPU statistics (overall CPU state percentages such as user, system, idle, and iowait).
- Device I/O statistics (throughput, operation rates, queueing, and utilization for block devices and partitions).
Linux builds usually read from kernel-provided interfaces such as /proc/stat, /proc/diskstats, /proc/partitions (older kernels), and /sys.
iostat vs related system tools
| Tool | Best for | Typical use |
|---|---|---|
iostat | Disk and CPU I/O view | Find busy disks, high await, high device utilization |
vmstat | Memory and scheduler behavior | Check run queue, swap activity, system pressure |
mpstat | Per-CPU analysis | Detect imbalanced CPU load and per-core hotspots |
pidstat | Per-process resource usage | Map host-level pressure to specific processes |
Install and verify iostat on Linux
On most Linux distributions, iostat is shipped by sysstat. You usually do not need a root shell for reading stats, but package installation needs elevated privileges.
# Check whether iostat is already installed
which iostat
# Show version (sysstat version)
iostat -V
# RHEL/CentOS/Amazon Linux
sudo yum install -y sysstat
# Fedora and newer RHEL-family systems
sudo dnf install -y sysstat
# Debian/Ubuntu
sudo apt-get update && sudo apt-get install -y sysstat
# RPM-based verification
rpm -qa | grep -i sysstatCode language: PHP (php)
Workflow: triage storage bottlenecks with iostat
flowchart TD
A[Alert high app latency] --> B[Run iostat -x 1 5]
B --> C{High await or high util}
C -- no --> D[Check CPU memory network with mpstat vmstat]
C -- yes --> E[Identify busiest device]
E --> F[Correlate with process tools]
F --> G[Apply fix tune rebalance or scale]
G --> H[Re-run iostat and validate]
20 practical iostat commands (Linux sysstat)
The following examples are Linux-focused. Option availability can vary by sysstat version and by Unix flavor, so confirm with man iostat on your host.
| # | Command | Purpose |
|---|---|---|
| 1 | iostat | Default CPU and device report (first report is since boot). |
| 2 | iostat -c | CPU statistics only. |
| 3 | iostat -d | Device statistics only. |
| 4 | iostat -x | Extended device statistics. |
| 5 | iostat -t | Add timestamp to each report. |
| 6 | iostat -m | Show throughput in MB/s units. |
| 7 | iostat -k | Show throughput in kB/s units. |
| 8 | iostat 2 | Refresh every 2 seconds until interrupted. |
| 9 | iostat 2 3 | Refresh every 2 seconds, 3 reports total. |
| 10 | iostat -d 1 5 | Device-only report every second, 5 times. |
| 11 | iostat -x 1 5 | Extended report every second, 5 times. |
| 12 | iostat -p sda | Show device and partition stats for one device. |
| 13 | iostat -p ALL | Show all devices and partitions. |
| 14 | iostat -x sda 1 5 | Extended stats focused on one device over time. |
| 15 | iostat -N | Display device-mapper or LVM-friendly names (if supported). |
| 16 | iostat -c -d | Explicitly request CPU and device sections. |
| 17 | iostat -t -x -m 2 10 | Timestamped extended report in MB/s every 2 seconds. |
| 18 | iostat -y 1 5 | Skip first boot-average report (if supported). |
| 19 | iostat -z 1 5 | Hide idle devices in output (if supported). |
| 20 | iostat -V | Show iostat/sysstat version information. |
# Example live triage session
iostat -x -m 1 10
iostat -p ALL 1 5
mpstat 1 5
vmstat 1 5Code language: PHP (php)
How to read key extended fields
| Field (common names) | What it indicates | Troubleshooting hint |
|---|---|---|
r/s, w/s | Read/write operations per second | Useful for understanding IOPS demand pattern. |
rkB/s, wkB/s | Read/write throughput | Compare bandwidth demand across devices. |
await | Average time for I/O completion | Rising await often means latency pressure. |
avgqu-sz or aqu-sz | Average queue depth | Growing queue with rising await suggests contention. |
%util | Device busy time percentage | Sustained high values can indicate saturation. |
CPU %iowait | CPU time waiting on I/O | High iowait with high disk latency points to storage bottlenecks. |
Compatibility notes across Linux and Unix variants
Older tutorials often mix Linux and non-Linux iostat options. For example, some Unix variants document flags not present in current Linux sysstat builds. Always validate command syntax with the local man page before automating.
Best practices
- Capture repeated samples (
interval count) instead of relying on one snapshot. - Use
-xduring incidents to see latency and queue behavior, not just throughput. - Correlate host-level metrics with process-level tools (
pidstat,iotop) before changing configuration. - Record timestamps (
-t) when comparing with application and database logs. - Treat field names as version-dependent; confirm on each distribution baseline.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals