Home > Package & System Management > iotop

iotop: Disk I/O Usage Monitoring

iotop is a utility for Linux systems that monitors disk I/O usage by processes or threads in real-time. It functions similarly to the 'top' command but focuses on disk read/write activity instead of CPU and memory usage. It is useful for diagnosing I/O bottlenecks in a system and identifying which processes are consuming significant disk resources.

Overview

iotop displays real-time disk I/O activity, allowing you to see in detail how much disk read/write each process or thread is performing. This helps in analyzing the causes of system performance degradation and understanding the disk usage patterns of specific applications.

Key Features

  • Real-time I/O monitoring per process/thread
  • Display of total disk read/write speeds
  • Hide processes with no I/O activity
  • View cumulative I/O statistics

Key Options

The main options for iotop help control the output format and focus on specific information.

Display/Filtering

Execution Control

Generated command:

Try combining the commands.

Description:

`iotop` Executes the command.

Combine the above options to virtually execute commands with AI.

Usage Examples

Various ways to monitor disk I/O activity using iotop.

Basic I/O Monitoring

sudo iotop

Displays real-time I/O usage for all processes/threads.

Show Only Processes with I/O Activity

sudo iotop -o

Filters and shows only processes/threads currently performing disk I/O.

Show Processes Only (Exclude Threads)

sudo iotop -P

Displays I/O usage on a per-process basis, excluding thread information.

Display Cumulative I/O Statistics

sudo iotop -ao

Shows the cumulative I/O total since iotop was run, instead of real-time speeds.

Update Every 3 Seconds

sudo iotop -d 3

Monitors with a screen update interval set to 3 seconds.

Installation

iotop is not included by default in most Linux distributions, so it needs to be installed via a package manager.

Debian/Ubuntu

sudo apt update
sudo apt install iotop

Installs iotop using the APT package manager.

CentOS/RHEL/Fedora

sudo yum install iotop  # or dnf install iotop

Installs iotop using the YUM or DNF package manager.

Tips & Notes

Tips and points to note for effective use of iotop.

Interpreting I/O Activity

iotop's output shows the disk read/write speeds of each process through the 'READ' and 'WRITE' columns. 'SWAPIN' indicates swap space usage, and 'IO' represents disk I/O wait time. High values may suggest disk bottlenecks.

  • READ/WRITE: Disk read/write speed per second
  • SWAPIN: Swap-in activity ratio
  • IO: I/O wait time ratio (time the process spends waiting for I/O)

Root Privileges Required

iotop generally requires root privileges to monitor all system I/O activity. Therefore, it is commonly run with `sudo`.

Performance Impact

iotop itself uses some system resources (especially CPU). Running it for extended periods on very busy systems or setting very short update intervals can have a minor impact on system performance.


Same category commands