When storage solid-state drives or storage arrays experience severe bottleneck lag, the iotop command-line utility provides top-like real-time monitoring of disk input/output operations per process. System administrators rely on iotop to catch runaway processes causing high I/O wait times. In stripped cloud virtual machines and lightweight Docker base images, executing the command outputs bash: iotop: command not found.
Install iotop via Distribution Package Managers
Installing iotop is supported across all major Linux package distributions.
- On Ubuntu, Debian, Linux Mint, and derivatives:
(Alternatively, install the modern C-based rewrite:sudo apt update && sudo apt install -y iotopsudo apt install -y iotop-c) - On CentOS, Rocky Linux, AlmaLinux, RHEL, and Fedora:
sudo dnf install -y iotop || sudo yum install -y iotop - On Alpine Linux:
apk update && apk add iotop - On Arch Linux:
sudo pacman -Sy iotop
Verify Kernel Task Delay Accounting Requirements
iotop reads per-process I/O statistics from the Linux kernel via Task Delay Accounting (CONFIG_TASK_DELAY_ACCT and CONFIG_TASK_IO_ACCOUNTING).
- Execute iotop with root privileges:
sudo iotop. - If the utility reports missing kernel accounting, enable task delay accounting at runtime:
sudo sysctl -w kernel.task_delayacct=1 - Alternatively, launch iotop in accumulated mode to track total disk writes:
sudo iotop -a
Monitor I/O Bottlenecks Using Native pidstat and vmstat
If operating inside strict immutable containers where installing iotop is restricted, native sysstat utilities provide similar disk telemetry.
- Use
pidstatto track per-process disk read/write bandwidth:pidstat -d 1 - Use
vmstatto monitor system-wide blocked processes (bcolumn) and I/O wait (wacolumn):vmstat 1 5