Displaying disk io statistics

To display bytes written, bytes read statistics of all partitions of the disks available in the system you can use iostat.

Below is an example usage.

iostat -p -d 1

outputs will be like this:

Linux 2.6.8-2-k7 (hostname.com)        07/22/08
Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
hda              10.03        18.39       179.74  438347774 4285350463
hda1              0.00         0.00         0.00       6258       5519
hda2              0.00         0.00         0.00          8          8
hda3             23.99        18.37       179.74  438026546 4285344936

You can also use feature rich alternative named dstat

Dstat is a versatile replacement for vmstat, iostat, netstat and ifstat. Dstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting.

Dstat allows you to view all of your system resources in real-time, you can eg. compare disk utilization in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).

$ dstat -a --fs

See also: man dstat