Nội dung
In this article, AZDIGI will introduce to you a very useful software on Linux called iotop, which helps monitor the level of hard disk I/O usage of the Linux system.
I. Introduction
Iotop is a free and open-source utility similar to the top command, aimed at providing an easy-to-use solution for monitoring detailed hard disk I/O usage of the Linux system. And it displays a user interface table of the current I/O usage by process or thread on the system.
The Iotop tool is programmed in Python and requires certain kernel functionalities to monitor and display processes. Iotop is a very useful tool for system administrators to monitor and detect specific processes causing high data read/write and I/O on the system.
II. How to install iotop on a Linux server
Before installing iotop on a Linux server, your server needs to meet the following two conditions:
- The server’s Kernel version must be 2.6.20 or higher.
- The server’s Python version must be 2.7 or higher.
To install and use iotop on a Linux server, we perform the following 3 steps.
Step 1: Install the iotop hard disk I/O monitoring tool on Linux.
As I mentioned above, iotop requires Kernel 2.6.20 and Python 2.7 or higher, so please update these two components to the latest version using one of the following commands:
-------------- On RHEL, CentOS and Fedora -------------- yum update -y -------------- On Fedora 22+ Releases -------------- dnf update -------------- On Debian, Ubuntu and Linux Mint -------------- apt-get update
Choose the command line that is appropriate for the operating system you are using.
After the update process has been completed, Please use the following two commands to recheck the Kernel and Python versions.
uname -r python -V
Here are my results after the update.
Below are the commands to install iotop from the source:
wget http://guichaz.free.fr/iotop/files/iotop-0.6.tar.bz2 tar -xjvf iotop-0.6.tar.bz2 cd iotop-0.6/ ./setup.py install
If you want to know the changes in iotop, you can track them at the following link:
Here is the image after completing the installation commands:
Step 2: Guide to using iotop
To use iotop, you need to run the command:
iotop
The command will display a list of running processes along with their current read/write and I/O information.
If you feel like there’s too much information, use the iotop -o
or iotop --only
commands to just show the processes using the data exchange.
iotop -o hoặc iotop --only
Everything is much more compact now. Because my system is at rest, there is almost no process.
Iotop has a lot of command options for you to use. If you want to find out then use the following command to see the full functions as well as the description of each function.
man iotop
If you want to log iotop then add the following crontab to your server:
* * * * * root iotop -botqqq >> /var/log/iotop
This log will be constantly updated for you to keep track of.
III. Summary
Iotop is a useful tool for almost all Linux server administrators. A tool that has to be said is very light and does not affect the overall performance of the whole system.
Hope this article will be of help to you. Wishing you success! See more useful articles about Linux VPS at the following link:
If you need assistance, you can contact support in the ways below:
- Hotline 247: 028 888 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com .