iotop(1)
Display I/O usage by process on the system, sorted by I/O bandwidth in real-time.
Synopsis
iotop [OPTION]... [PID]...Description
iotop is a top-like tool for monitoring disk I/O activity per process. It displays which processes are reading and writing to disk, how much data they've transferred, and their I/O bandwidth in real-time. Requires root or CAP_SYS_ADMIN capabilities.
The interface shows processes sorted by I/O activity, with columns for DISK READ, DISK WRITE, SWAPIN, IO%, and COMMAND. Press 'q' to quit, 'o' to toggle-sort, and 'p' to show/hide processes with no I/O.
Common options
| Flag | What it does |
|---|---|
-o, --only | Show only processes or threads actually doing I/O |
-b, --batch | Run in non-interactive batch mode, output one iteration then exit |
-n NUM, --iter=NUM | Exit after NUM iterations in batch mode |
-d SEC, --delay=SEC | Set refresh interval to SEC seconds (default 1) |
-p PID, --pid=PID | Monitor only process with given PID |
-u USER, --user=USER | Monitor only processes belonging to given user |
-k, --kilobytes | Display I/O in kilobytes instead of human-readable units |
-t, --time | Include total I/O time accumulation in output |
-a, --accumulated | Show accumulated I/O instead of bandwidth |
Examples
Launch interactive iotop monitoring all processes; refresh every 1 second
sudo iotopShow only processes actively doing I/O, hiding idle processes
sudo iotop -oRun batch mode for 3 iterations with 2-second delay, then exit
sudo iotop -b -n 3 -d 2Monitor I/O activity for process PID 1234 only
sudo iotop -p 1234Show I/O activity for all processes owned by the postgres user
sudo iotop -u postgresDisplay accumulated I/O totals with 5-second refresh interval
sudo iotop -a -d 5