A tool called iostat can be used to display CPU reports, it can also be used to display disk, partition input and output statistics reports.

CPU Utilization Report

Here are some columns of CPU report:

Column Description
%user User level CPU usage. (application CPU usage)
%nice CPU usage with nice priority at the user level.
%system System level CPU usage. (kernel CPU usage)
%iowait The time CPU or CPUs were idle when the system had an unfinished disk I/O operation.
%steal The amount of time the current processor unwillingly waits when the hypervisor is serving other virtual processors.
%idle The time CPU or CPUs were idle when the system had no unfinished disk I/O operations.

Device Utilization Report

Here are some columns of device report:

Column Description
Device The device (partition) name listed under the /dev directory.
tps Transfers per second sent to the device. Each transfer is an I/O request, which is usually a combination of multiple logical requests.
Blk_read/s (kB_read/s, MB_read/s) The number of blocks read from the device per second.
Blk_wrtn/s (kB_wrtn/s, MB_wrtn/s) The number of blocks written to the device per second.
Blk_dscd/s (kB_dscd/s, MB_dscd/s) The number of blocks discarded for the device per second.
Blk_read (kB_read, MB_read) The total number of blocks read from the device.
Blk_wrtn (kB_wrtn, MB_wrtn) The total number of blocks written to the device.
Blk_dscd (kB_dscd, MB_dscd) The total number of blocks discarded for the device.
r/s Read requests per second completed for the device.
w/s Write requests per second completed for the device.
d/s Discard requests per second completed for the device.
sec/s (kB/s, MB/s) The number of sectors read from, written to, or discarded for the device per second.
rsec/s (rkB/s, rMB/s) The number of sectors read from the device per second.
wsec/s (wkB/s, wMB/s) The number of sectors written to the device per second.
dsec/s (dkB/s, dMB/s) The number of sectors discarded for the device per second.
rqm/s The number of merged I/O requests per second in the device queue.
rrqm/s The number of merged read requests per second in the device queue.
wrqm/s The number of merged write requests per second in the device queue.
drqm/s The number of merged discarded requests per second in the device queue.
%rrqm The percentage of merged read requests per second before being sent to the device.
%wrqm The percentage of merged write requests per second before being sent to the device.
%drqm The percentage of merged discard requests per second before being sent to the device.
areq-sz The average size of the I/O requests sent to the device.
rareq-sz The average size of the I/O read requests sent to the device.
wareq-sz The average size of the I/O write requests sent to the device.
dareq-sz The average size of the I/O discard requests sent to the device.
await Average time spent on I/O requests sent to the device, including queuing and service time.
r_await Average time spent on read requests sent to the device, including queuing and service time.
w_await Average time spent on write requests sent to the device, including queuing and service time.
d_await Average time spent on discard requests sent to the device, including queuing and service time.
aqu-sz The average queue length sent to the device.
%util The percentage of time run-time I/O requests sent to the device.

Options

Here are some sorting commands for glances:

Option Description
-c Show CPU Report
-d Show Device Report
-g group_name {device […]|ALL} Show Statistics for a Group of Devices
-h Show Device Report as Human Readable Format
-k Show Units in Kilobytes
-m Show Units in Megabytes
-p [{device[,…]|ALL}] Show Block Devices and Their Partitions
-t Show the Time for Each Report
-x Show Extended Information

Examples

We need to install it first:

1
yum install sysstat -y

Run iostat

1
iostat 1 2    # 1 is the time used to show the next output, 2 is the number of outputs.
img

Show CPU Report

1
iostat -c
img

Show Device Report

1
iostat -d
img

Show Statistics for a Group of Devices

1
iostat -g root sda
img

Show Device Report as Human Readable Format

1
iostat -h
img

Show Units in Kilobytes

1
iostat -k
img

Show Units in Megabytes

1
iostat -m
img

Show Block Devices and Their Partitions

1
iostat -p ALL
img

Show the Time for Each Report

1
iostat -t
img

Show Extended Information

1
iostat -x
img

References IOSTAT(1)

Buy me a coffeeBuy me a coffee