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.
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 :
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 —>
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
iotop rpm download : http://guichaz.free.fr/iotop/files/iotop-0.4.1-1.noarch.rpm
- rpm -ivh iotop-0.4.1-1.noarch.rpm
Thats it. You have done.