Linux iostat Command Tutorial With Examples

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-iostat-command-tutorial-examples/
PINTEREST
PINTEREST
INSTAGRAM

Linux iostat is part of the sysstat utilities. iostat command is mainly used to track input output related events and issues. iostat command can provide metrics, information and statistics about input and output.

Install

Iostat is installed with sysstat tools which is explained in the following page.

http://www.poftut.com/linux-sysstat-utilities-monitoring-system-performance/

Help

Help about iosstat can be get with --help options like below.Simple help provides information about the syntax too.

Help

Help

Basic

iostat have different usage types. Using without parameters like below will print information about cpu usage and disk statistics.

iostat

iostat

Display Only CPU Statistics

Only CPU information can be listed with -c option like below. This will print information like average CPU usage with related user, system, idle values. Also systems kernel version host name CPU count and CPU architecture is printed too.

Display CPU Statistics

Display CPU Statistics

Display Only Disk Statistics

Only disk information about the system can be listed with -d option. This options will provide information like tps,read, write KB.

Display Only Disk Statistics

Display Only Disk Statistics

Display Single Disk Statistics

In previous example we have printed information about all connected disks. there is also option for only list single disk information. We will just provide the disk path after the option -d like below.

Display Single Disk Statistics

Display Single Disk Statistics

Display As MB(Megabyte)

Up to now we have used default option about size. This can be changed to make it more human readable. iostat output can be provided with mega byte with -m . In the following example read, write values are presented as MB

LEARN MORE  Expect Scripting Tutorial With Examples

Display As MB(Megabyte)

Display As MB(Megabyte)

Display Time stamps

While using iostat in a interval refresh state we will need time stamp for each print. This can be printed with -t parameter like below.

Display Time stamps

Display Time stamps

Display Extended Status

In previous example we used options to print major metrics but there is a lot of metrics and statistics about this subsystems. This extended information provides more detailed metric about the subsystem.

Display Extended Status

Display Extended Status

Set Refresh Interval

One of the best feature is refreshing iostat command at specified intervals. This interval can be specified with just providing seconds like below. In this example we use 2 seconds for interval value.

Set Refresh Interval

Set Refresh Interval

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/linux-iostat-command-tutorial-examples/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)