$linuxjunkies
>

iotop(1)

Display I/O usage by process on the system, sorted by I/O bandwidth in real-time.

UbuntuDebianFedoraArch

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

FlagWhat it does
-o, --onlyShow only processes or threads actually doing I/O
-b, --batchRun in non-interactive batch mode, output one iteration then exit
-n NUM, --iter=NUMExit after NUM iterations in batch mode
-d SEC, --delay=SECSet refresh interval to SEC seconds (default 1)
-p PID, --pid=PIDMonitor only process with given PID
-u USER, --user=USERMonitor only processes belonging to given user
-k, --kilobytesDisplay I/O in kilobytes instead of human-readable units
-t, --timeInclude total I/O time accumulation in output
-a, --accumulatedShow accumulated I/O instead of bandwidth

Examples

Launch interactive iotop monitoring all processes; refresh every 1 second

sudo iotop

Show only processes actively doing I/O, hiding idle processes

sudo iotop -o

Run batch mode for 3 iterations with 2-second delay, then exit

sudo iotop -b -n 3 -d 2

Monitor I/O activity for process PID 1234 only

sudo iotop -p 1234

Show I/O activity for all processes owned by the postgres user

sudo iotop -u postgres

Display accumulated I/O totals with 5-second refresh interval

sudo iotop -a -d 5

Related commands