GICT knowledge base
Linux iostat Command
Published
The iostat command used to measure the load on the input/output devices with reference to the time the devices are active with respect to the average transfer rates of the devices. It provides the usage of the input/output devices and processor. The reports created by the iostat provides the details to alter the system configurations to maintain the balance of the input/output between physical disks.
Installation of iostat
On RedHat / CentOS / Fedora
# yum install sysstat
On Debian / Ubuntu / Linux Mint
$ sudo apt-get install sysstat
Running iostat
Type iostat in the console.
The reports provide three types of reports such as CPU Utilization report, the Device Utilization report and the Network File system report.
Among that the CPU Utilization report has the following format
%user
Show the percentage of CPU utilization that occurred while executing at the user level (application).
%nice
Show the percentage of CPU utilization that occurred while executing at the user level with nice priority.
%system
Show the percentage of CPU utilization that occurred while executing at the system level (kernel).
%iowait
Show the percentage of time that the CPU or CPUs were idle during which the system had an outstanding disk I/O request.
%steal
Show the percentage of time spent in involuntary wait by the virtual CPU or CPUs while the hypervisor was servicing another virtual processor.
%idle
Show the percentage of time that the CPU or CPUs were idle and the system did not have an outstanding disk I/O request.
The second section contains device utilization report
Device: device / partition name as listed in /dev directory
tps: show the number of transfers per second that were issued to the device. From the tps value we can determine whether the processor is busy or not. If the tps value is high that means the processor is busy.
Blk_read/s: show the amount of data read from the device expressed in a number of blocks (kilobytes, megabytes) per second
Blk_wrtn/s: show the amount of data written to the device expressed in a number of blocks (kilobytes, megabytes) per second
Blk_read: show the total number of blocks read
Blk_wrtn: show the total number of blocks written
Capture iostat with kilobytes or megabytes
The iostat reports can be displayed in various units of measurements such as in kilobytes or megabytes units. For viewing in kilobytes unit -k parameter can be used and -m parameter to create reports in megabytes’ unit.
$ iostat -k
$ iostat -m
For more detailed report we have -x parameter.
$ iostat -x
Using iostat with delay
Run iostat with kilobytes unit, 3 seconds interval with 2 times reports
$ iostat -m 3 2
Show CPU only report with 2 seconds interval and 4 times reports
$ iostat -c 2 4
The reference of iostat to create reports are:
1) /proc/stat
2) /proc/partitions
3) /proc/diskstats
4) /sys
If you need any further assistance please contact our support department.
Related guides
How to Restrict an SSH Key to One Command
Restrict an SSH key to one command with authorized_keys options. Protect the command and check that unwanted shell and forwarding access are denied.
Linux and CommandsSelf-Hosted Video Processing With FFmpeg: A Practical Guide
Learn how to self-host video processing on a VPS using FFmpeg, with practical commands for conversion, compression, thumbnails, and automated workflows.
Linux and CommandsHow to use nohup: Commands in Linux That Survive Terminal Closes
Keep commands running after you close the terminal. nohup examples with wget, Python, rsync, and Docker on any VPS.
Linux and CommandsHow to Fix “Too Many Open Files” Error on Linux Servers
Learn how to fix the "Too Many Open Files" error on Linux servers by understanding file descriptors, adjusting limits, and diagnosing leaks effectively.




