Any Linux sysadmins reading this?
In FreeBSD, I can use systat to find out how
given disk is. It looks like this:
Disks da0 da1 pass0 pass1 md0 KB/t 26.67 22.10 0.00 0.00 0.00 tps 1 8 0 0 0 MB/s 0.02 0.18 0.00 0.00 0.00 % busy 0 4 0 0 0 queue 0 0 0 0 0
See, disk da1 was 4% busy during that 5 second snapshot. (I ran systat -v 5).
That's very useful when diagnosing a disk-bound MySQL server that's not doing lots of I/O but ends up waiting for lots of disk seeks on a slow RPM drive.
How do I do that in Linux?
I don't want to know how much I/O it's doing--that's easy... I want to know how often it's servicing an I/O request ('cause it may spend a lot of time seeking). I need to know how busy the disk is--even if it's not doing any I/O at the moment.
vmstat will give me I/O figures (read & write) but not % busy.
On Solaris, I'll use iostat to look at the average wait time for disk requests. It turns out that Linux can do the same thing. The await value tells you this.
However, I ran iostat -d -k -x 5 but got no data--just headers. It seems that -x only works in post 2.5 kernels. Damn.
My questions are two-fold:
- Can I get those stats for a 2.4.xx kernel? How?
- Can I get something like FreeBSD's systat % busy value in Linux? How?
Thanks to any pointers you might offer.
Update: Steve tried iostat -x on his RedHat 8 box and got meaningful output. Now I'm really puzzled.
Posted by jzawodn at June 24, 2003 08:46 PM