Monitoring I/O on Linux


You can use iostat to find out disk utilization, but with iotop you can monitor the actual read/write. iotop watches the I/O usage information output by the kernel and displays it in a table of current I/O usage by processes.

iotop syntax for monitoring I/O usage

  • -o Will only show processes or threads which are actually doing I/O instead of showing all processes/threads.
  • -a Will show accumulated I/O instead of bandwith. With this syntax iotop shows the amount of I/O processes have done since iotop started.

If the -a syntax doesn’t work you have to update iotop to the latest version by installing it manually.

Example:

  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
265 be/3 root          0.00 B     16.00 K  0.00 %  0.05 % [jbd2/sda5-8]
2567 be/4 root          0.00 B     23.73 M  0.00 %  0.00 % wget http://mirror.us.leaseweb.net/speedtest/50mb.bin
24908 be/4 www-data      0.00 B      4.00 K  0.00 %  0.00 % apache2 -k start
1955 be/4 www-data      0.00 B     16.00 K  0.00 %  0.00 % apache2 -k start