Iostat
Jump to navigation
Jump to search
iostat[1] is a command-line utility that reports CPU statistics and input/output statistics for devices and partitions.
iostat command
#The basic syntax of the iostat command
$iostat [options] [interval [count]]
#options: options can be used to specify the type of statistics to be displayed, such as disk statistics, CPU utilization statistics, etc.
#interval: The interval parameter specifies the amount of time in seconds between each report
#count:The count parameter can be specified in conjunction with the interval parameter. If the count parameter is specified, the value of count determines the number of reports generated at interval seconds apart. If the interval parameter is specified without the count parameter, the iostat command generates reports continuously.
iostat output
#iostat output example
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
device 0.00 0.00 100 50 50 100 10 3.00 0.00 0.00 5.00
# IOPS from the output
The IOPS for this device is r/s + w/s = 100 + 50 =150
column | Description |
---|---|
rrqm/s | the number of read requests that were merged per second |
wrqm/s | the number of write requests that were merged per second |
r/s | the number of reads per second |
w/s | the number of writes per second |
rkB/s | the number of kilobytes read per second |
wkB/s | the number of kilobytes written per second |
avgrq-sz | the average size of each request in sectors |
avgqu-sz | the average queue length of the requests |
await | the average time (in milliseconds) that each request spent in the queue |
svctm | the average service time (in milliseconds) for each request |
%util | the percentage of time that the disk was active |