What Is Iotop?
Iotop is an open source and free utility like Linux UI based Top command that used to monitor the Disk I/O and to trace the exact process or high used user disk read/writes. Iotop tool is based on Python programming requires Kernel accounting function to monitor and display processes. It can be very useful tool for system administrator to trace the specific process that may causing a disk I/O.
- Kernel 2.6.18
- Python 2.4 with ctypes module
Installing Iotop in RHEL, CentOS and Fedora
Step 1: Installing Iotop Pre-requisites
As I already said above that Iotop requires latest Kernel 2.6.18 and Python 2.4 with ctypes module, let’s first update Linux Kernel with the help of following command.
# yum update kernel
Then you need to update Python with ctypes module for iotop package.
# yum install python python-ctypes
Step 2: Installing Iotop
To install iotop use the following yum command to install it on RHEL, CentOS and Fedora.
# yum install iotop
Step 3: Running Iotop
To run the iotop command, use the following command as root user.
I recommend you all that start using iotop with -o or –only option to see all the running processes or threads actually doing I/O, instead of watching all processes or threads.
# iotop --only
Step 4: Iotop Usage
To list all the usage and options of iotop command, run the following command to check the man pages.
# man iotop
Some important iotop usage and keyboard shortcuts.
- Move left or right arrow key to change the sorting.
- Use –version option to see version number and exit.
- Use -h option to see information of usage.
- Use -r option to reverse the sorting order.
- Use -o option to check processes or thread.
- Use -b option to Turn On non-interactive mode to enable logging I/O usage.
- Use -p PID to list all processes/threads to monitor.
- Use -u USER option to list all the users to monitor.
- Use -P option to list only processes. Normally iotop displays all threads.
- Use -a option to check accumulated I/O instead of bandwidth.
All the above iotop options are fairly straightforward. The interface almost looks and functions exactly same as Linux top command, So if you are a already familiar with its usage, then iotop will be a much simpler than top.