Iotop – benchmark disk I/O

What is iotop?


Iotop is a top like command utility which helps the administrator to monitor the disk i/o and to figure out the exact process or user using high disk read/writes. Its a Python based tool makes use of the kernel accounting function (similar to the bi and bo on vmstat) to display the values. The following figure show the screen-caps of iotop.

Iotop

Installing iotop on centos


Installation in not easy if you are running an old version of Python and kernel version below 2.6.20. You have to met the following requirements to install and run the tool successfully.

  • – Linux >= 2.6.20 with-I/O accounting support (CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING)
    – Python >= 2.5 or Python 2.4 with the ctypes module

Upgrading Python :

Latest version are available at http://www.python.org/download/releases/2.6/ , you can download and install/upgrade it from source, python rpm version can also on http://rpm.pbone.net/

Upgrading kernel via rpm :

Download and install the latest kernel rpm(version 2.6.20 and above) from your distribution website or you can try the mirror http://www.centos.toracat.org/ajb/kernel/mainline/ to download the latest versions. If you planning for kernel source upgrade, download the latest source from ftp.kernel.org and on the make menu config you can find the “I/O accounting support” under General setup  —>

I-O-accounting-support.png

Reboot the system with the new kernel so you have the supported version of Python & kernel to run the iotop tool now. Next step is to download the iotop source or rpm and install it.

iotop tar download : http://guichaz.free.fr/iotop/files/iotop-0.4.1.tar.gz

Use RPM package to install it.

iotop rpm downloadhttp://mirror.centos.org/centos/7/os/x86_64/Packages/iotop-0.6-2.el7.noarch.rpm

  • rpm -ivh iotop-0.6-2.el7.noarch.rpm

That’s it. You have done.