How to find Linux Disk utilization – using iostat
Use iostat command to find out disk utilization and for monitoring system input/output device loading by observing the time the physical disks are active in relation to their average transfer rates.
Display 3 reports of extended statistics at 5 second intervals for disk
$ iostat -d -x 5 3
Output:
Linux 2.6.18-53.1.4.el5 (server.expertslogin.in) 7/7/2010
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util
sda 1.10 39.82 3.41 13.59 309.50 427.48 43.36 0.17 10.03 1.03 1.75
sdb 0.20 18.32 1.15 6.08 117.36 195.25 43.22 0.51 71.14 1.26 0.91
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 108.40 1.40 64.40 49.60 1382.40 21.76 0.04 0.67 0.44 2.92
sdb 0.00 37.80 0.00 245.20 0.00 2254.40 9.19
Where,
* rrqm/s : The number of read requests merged per second that were queued to the hard disk
* wrqm/s : The number of write requests merged per second that were queued to the hard disk
* r/s : The number of read requests per second
* w/s : The number of write requests per second
* rsec/s : The number of sectors read from the hard disk per second
* wsec/s : The number of sectors written to the hard disk per second
* avgrq-sz : The average size (in sectors) of the requests that were issued to the device.
* avgqu-sz : The average queue length of the requests that were issued to the device
* await : The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them.
* svctm : The average service time (in milliseconds) for I/O requests that were issued to the device
* %util : Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.
iostat syntax for disk utilization report
iostat -d -x interval count
* -d : Display the device utilization report (d == disk)
* -x : Display extended statistics including disk utilization
* interval : It is time period in seconds between two samples . iostat 2 will give data at each 2 seconds interval.
* count : It is the number of times the data is needed . iostat 2 5 will give data at 2 seconds interval 5 times.
Category: Linux Administration
