iostat

From LinuxReviews
Jump to navigationJump to search

iostat is, as the name implies, a command-line utility which displays input/output statistics for devices, partitions, RAID arrays and logical volumes.

Basic Use[edit]

Iostat-ohmygirl-yooa.jpg
Typical iostat output. It's easy to see that device-mapped volume 7 on RAID array md130 with the disks sdf, sdg and sdh is writing a lot of data.

iostat will output some not useful information once if you simply run iostat. It takes it one run to gather actual not aggregated utilization data; it's second run will show actual information. iostat takes two numbers as arguments: A interval for displaying data and a number of data instances to output. iostat 1 2 will output one list of disinformation and a list of actual disk utilization the next second and then it will exit. iostat 2 10 will output i/o statistics every two seconds ten times.

Omitting a second number will make iostat run indefinitely. It can, like most command-line programs, be terminated by pressing ctrl-c.

The -h option makes iostat show "human readable" output; that means megabytes and kilobytes is used instead of the precise amount of bytes read and written. Some prefer the -h options, others do not.

iostat will by default output CPU utilization information followed by I/O statistics. The -c argument will make it only display CPU information and -d makes it only display disk (I/O) information. The default is -c -d

The iostat manual page has some more options which are not at all interesting.

Installation[edit]

iostat is a part of the sysstat package. There is no separate iostat package available; install your distributions sysstat package to get it. sysstat's homepage is at sebastien.godard.pagesperso-orange.fr.

Alternatives[edit]

sar, which is also a part of sysstat, can display the same kind of I/O information as well as I/O averages using it's -d option.

Alternatives[edit]

See Comparison Of System Monitoring Programs.


Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.