# Can I view I/O stats per-disk w/2.6.28

## Cyker

Hi,

Does anyone know of a utility like iostat or bwm-ng which can display I/O stats per disk with 2.6.28?

Previously, I was happily using "iostat -d -k 1", but somewhere between kernel 2.6.24 and 2.6.28, someone decided to change the /proc files, so now /proc/diskstat now contains partition iostat data as well as disk stat data (This confuses me somewhat; Wasn't that what /proc/partition was supposed to be for??)

Anyway, as a result of this, iostat now gives too much output, and just under half of it duplicated redundant data.

Now, I can tell iostat specifically which devices you want iostat to display (e.g. iostat -d -k 1 hda hdb hdd md0 etc.), but unlike the old behavior, new devices plugged in or otherwise brought online will not show up. (i.e. if I bring up the external eSATA array, I don't get any stats on it.)

I tried bwm-ng, which is slightly better as I can specify what devices NOT to display, but it displays less info than iostat and, when another device is plugged in, you still get the stats of that device AND it's partitions.

If anyone knows of a way to get some semblance of the old behavior back, either by a) Suggesting a more suitable utility, or b) Kernel hacking the stats back to how they were (Instructions suitable for an advanced n00b  :Razz: ), I'd appreciate the info!

Cheers!  :Smile: 

----------

## richard.scott

Have you tried app-benchmarks/iozone?

I'm not sure exactly what figures it would give you tho.

----------

## Cyker

Alas IOzone seems to be a benchmarking tool; I'm more after a textmode real-time disk io monitor that can display stuff by disk instead of by partition.

----------

## gringo

did you try iotop ? I´m not in front of linux right now but i think it can display stats by device.

cheers

----------

## Cyker

Had a look at iotop, but it complains about some kernel thing missing.

Not sure what it wants since iostat and bwm-ng can pick up diskstat data just fine...

Not a likely candidate unless it's a config error; I'm not recompiling the kernel and rebooting the server just to try a python script!!  :Shocked: 

I'm thinking maybe it'd be easier to kludge a script which repeatedly calls iostat and custom-tailor's the calling command line to only display disks and not partitions, althought I think it will be tricky writing a suitable filter to take into account virtual disks like RAID arrays and network drives...

----------

## coolsnowmen

Quick iotop how to here if you have problems:

needed kernel includes:

```

General Setup -->

  [*] Export task/process statistics through netlink

  [ ]   Enable per-task delay accounting

  [*]   Enable extended accounting over taskstats

  [*]     Enable per-task storage I/O accounting

```

http://www.gentoo.org/news/en/gmn/20080930-newsletter.xml

----------

## zeek

dstat -f does the job for me.  It even shows individual disks in a md raid1.

----------

