The iostat command.

  Uncategorized

The iostat will display the current CPU load average and disk I/O information. This is a great command to monitor your disk I/O usage.
# iostat
Linux 2.4.20-24.9 (myhost) 12/23/2003

avg-cpu: %user %nice %sys %idle
62.09 0.32 2.97 34.62

Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
dev3-0 2.22 15.20 47.16 1546846 4799520
For 2.4 kernels the devices is names using the device’s major and minor number. In this case the device listed is /dev/hda. To have iostat print this out for you, use the -x.
# iostat -x
Linux 2.4.20-24.9 (myhost) 12/23/2003

avg-cpu: %user %nice %sys %idle
62.01 0.32 2.97 34.71

Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
/dev/hdc 0.00 0.00 .00 0.00 0.00 0.00 0.00 0.00 0.00 2.35 0.00 0.00 14.71
/dev/hda 1.13 4.50 .81 1.39 15.18 47.14 7.59 23.57 28.24 1.99 63.76 70.48 15.56
/dev/hda1 1.08 3.98 .73 1.27 14.49 42.05 7.25 21.02 28.22 0.44 21.82 4.97 1.00
/dev/hda2 0.00 0.51 .07 0.12 0.55 5.07 0.27 2.54 30.35 0.97 52.67 61.73 2.99
/dev/hda3 0.05 0.01 .02 0.00 0.14 0.02 0.07 0.01 8.51 0.00 12.55 2.95 0.01
The iostat man page contains a detailed explanation of what each of these columns mean.

Views: 12

LEAVE A COMMENT

What is the capital of Egypt? ( Cairo )