Home Linux ServerTools iotop – Monitor I/O on Linux

iotop – Monitor I/O on Linux

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

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:

AZDIGI Tutorial
-------------- 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.

iotop
The update process has been completed.

After the update process has been completed, Please use the following two commands to recheck the Kernel and Python versions.

AZDIGI Tutorial
uname -r
python -V
    

Here are my results after the update.

image 148
The Kernel and Python versions are now suitable for installing iotop.

Below are the commands to install iotop from the source:

AZDIGI Tutorial
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:

image 149
iotop installation is complete.

Step 2: Guide to using iotop

To use iotop, you need to run the command:

AZDIGI Tutorial
iotop
    

The command will display a list of running processes along with their current read/write and I/O information.

iotop
The interface of iotop.

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.

AZDIGI Tutorial
iotop -o
hoặc 
iotop --only
    

Everything is much more compact now. Because my system is at rest, there is almost no process.

iotop
You should use iotop -o or iotop --only to display the data exchange processes on the system only.

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.

AZDIGI Tutorial
man iotop
    

If you want to log iotop then add the following crontab to your server:

AZDIGI Tutorial
* * * * * 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:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign