Linux iotop Check What’s Stressing & Increasing Load On Hard Disks

The iotop command is top like utility for disk I/O. It watches I/O usage information output by the Linux kernel. It displays a table of current I/O usage by processes or threads on the Linux system. This post explains how to install and use iotop command to find out what’s stressing (or program names) on your hard drives under Linux operating systems.

Install iotop on Linux to see current I/O usage by processes or threads

You need to iotop as per your Linux distribution.

RHEL/CentOS install iotop

Use the yum command as follows:
# yum install iotop

Debian/Ubuntu Linux install iotop

Debian / Ubuntu Linux user try the apt command or apt-get command as follows to install the same:
$ sudo apt-get install iotop

How do I use iotop command?

iotop command displays columns for the I/O bandwidth read and written by each process/thread during the sampling period. It also displays the percentage of time the thread/process spent while swapping in and while waiting on I/O. For each process, its I/O priority (class/level) is shown. In addition, the total I/O bandwidth read and written during the sampling period is displayed at the top of the interface. Type the following command to run iotop (must run as root):
$ sudo iotop
# iotop

Fig.01: iotop: Linux Disk I/O Monitor Command in Action

Linux iotop Check What’s Stressing & Increasing Load On Hard Disks

I recommend that you start the iotop command with --only option to see only processes or threads actually doing I/O, instead of showing all processes or threads (you can set this mode dynamically too see keyboard shortcut o for more info):
# iotop --only
Sample outputs:

Fig.02: Only See Process Eating Your Disk I/O

Other supported options by iotop command:

Options Description
--version show program’s version number and exit
-h, --help show this help message and exit
-o, --only only show processes or threads actually doing I/O
-b, --batch non-interactive mode
-n NUM, --iter=NUM number of iterations before ending [infinite]
-d SEC, --delay=SEC delay between iterations [1 second]
-p PID, --pid=PID processes/threads to monitor [all]
-u USER, --user=USER users to monitor [all]
-P, --processes only show processes, not all threads
-a, --accumulated show accumulated I/O instead of bandwidth
-k, --kilobytes use kilobytes instead of a human friendly unit
-t, --time add a timestamp on each line (implies –batch)
-q, --quiet suppress some lines of header (implies –batch)

Important keyboard shortcuts for iotop command

  1. Hit the left and right arrow keys to change the sorting.
  2. Hit r to reverse the sorting order.
  3. Hit o only to see processes or threads actually doing I/O, instead of showing all processes or threads.
  4. Hit p only show processes. Normally iotop shows all threads.
  5. Hit a display accumulated I/O instead of bandwidth. In this mode, iotop shows the amount of I/O processes have done since iotop started.
  6. Ht i to change the priority of a thread or a process’ thread(s) i.e. ionice.
  7. Hot q to quit iotop.

Check out related media

Recommended readings:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 4 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
4 comments… add one
  • Arseny Jul 21, 2012 @ 4:36

    Good one! But – here is no iotop for FreeBSD?

    # whereis iotop

  • Prof. I Pee Freely Jul 22, 2012 @ 3:51

    Seems to be an alt for FBSD:

  • Nick Jul 23, 2012 @ 8:52

    correction: (from the program itself)

    iotop requires kernel-2.6.18-199.el5 or later

  • DDR Host Feb 3, 2015 @ 20:16

    Thanks. This helped me a lot!

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum