Base usage > What tool can you use to check I/O load?


Author: ochirkov
March 20, 2014, 12:36 a.m.

1 Solution



The sysstat package contains utilities to monitor system performance and usage activity. Sysstat contains various utilities, common to many commercial Unixes, and tools you can schedule via cron to collect and historize performance and activity data.

iostat reports CPU statistics and input/output statistics for devices, partitions and network filesystems.

mpstat reports individual or combined processor related statistics.

pidstat reports statistics for Linux tasks (processes) : I/O, CPU, memory, etc.

sar collects, reports and saves system activity information (CPU, memory, disks, interrupts, network interfaces, TTY, kernel tables,etc.)

sadc is the system activity data collector, used as a backend for sar.

sa1 collects and stores binary data in the system activity daily data file. It is a front end to sadc designed to be run from cron.

sa2 writes a summarized daily activity report. It is a front end to sar designed to be run from cron.

sadf displays data collected by sar in multiple formats (CSV, XML, etc.) This is useful to load performance data into a database, or import them in a spreadsheet to make graphs.

sysstat is just a manual page for sysstat configuration file, giving the meaning of environment variables used by sysstat commands.

nfsiostat-sysstat reports input/output statistics for network filesystems (NFS).

cifsiostat reports CIFS statistics.

The following “sar -b” command reports I/O statistics. “1 3″ indicates that the sar -b will be executed for every 1 second for a total of 3 times.

root@ansible:/root/.ssh# sar -b 1 3
Linux 3.8.0-19-generic (ansible)        03/24/2014      _x86_64_        (1 CPU)

12:20:15 AM       tps      rtps      wtps   bread/s   bwrtn/s
12:20:16 AM    151.11      1.11    150.00      8.89 152177.78
12:20:17 AM    193.33      1.11    192.22      8.89 193511.11
12:20:18 AM    186.81      1.10    185.71      8.79 189758.24
Average:       177.12      1.11    176.01      8.86 178523.99

       -b     Report I/O and transfer rate statistics.  The following values are displayed:

                     Total number of transfers per second that were issued to physical devices.  A transfer is an I/O request to a physical
                     device. Multiple logical requests can be combined into a single I/O request to the device.  A transfer is of  indeterā€
                     minate size.

                     Total number of read requests per second issued to physical devices.

                     Total number of write requests per second issued to physical devices.

                     Total  amount of data read from the devices in blocks per second.  Blocks are equivalent to sectors and therefore have
                     a size of 512 bytes.

                     Total amount of data written to devices in blocks per second.


iostat reports CPU, disk I/O, and NFS statistics. The following are some of iostat command examples.

Iostat without any argument displays information about the CPU usage, and I/O statistics about all the partitions on the system as shown below.

root@ansible:/root/.ssh# iostat
Linux 3.8.0-19-generic (ansible)        03/24/2014      _x86_64_        (1 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.20    0.01    0.47    0.18    0.00   99.14

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               0.34         0.99        16.90     368219    6283388

root@ansible:/root/.ssh# iostat
Linux 3.8.0-19-generic (ansible)        03/24/2014      _x86_64_        (1 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0.20    0.01    0.47    0.18    0.00   99.14

Device:            tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
sda               0.34         0.99        16.90     368227    6283516


root@ansible:/root/.ssh# vmstat -d
disk- ------------reads------------ ------------writes----------- -----IO------
       total merged sectors      ms  total merged sectors      ms    cur    sec
sda    19086   6087  738326  322356 108247  85791 14735736 6081592      0    712


       total: Total reads completed successfully
       merged: grouped reads (resulting in one I/O)
       sectors: Sectors read successfully
       ms: milliseconds spent reading

       total: Total writes completed successfully
       merged: grouped writes (resulting in one I/O)
       sectors: Sectors written successfully
       ms: milliseconds spent writing

       cur: I/O in progress
       s: seconds spent for I/O

Author: ochirkov
March 24, 2014, 12:40 a.m.

Your solution:

To highlight code snippets choose "Format->Formatted" or use "pre" tag for source html code.
algorithm array awk bash bios boot-up bubble built-in chmod dictionary difference dividers division file forkbomb google grep group grub if ifconfig init insertion iostat ip itilities link linked linux list lower-case max merge parse prevention python quick reboot redirect regex restore rm search seek selection set shell sort string sum trash tree troubleshooting union update upper-case user