Linux – Disk IOPS count in GNU/Linux

iopslinux

I can't find information about ways to count disk iops in GNU/Linux for some time period. I saw iostat, but I'm not sure it is right way. Also i need tool, that can count iops for all time since system is started, but iostat doesn't do this.
I mean disk iops for whole systems and for any logical volume.

May be there are some tools to limit disk iops for logical volume or smth like that.

If it matters, I use Debian. Also I use hardware MegaRaid Raid Controller. May be it influences on smth.

Best Answer

iostat is the right way to get IO count over time.

If you want totals since boot, you can read those from /proc/disktats. Description of the file format is in your kernel's Documentation/iostats.txt (or here).

This information is also available per-device or per-partition in /sys/block/${DEVICE}/stat and /sys/block/${DEVICE}/${DEVPART}/stat (substitute ${DEVICE} with your device name eg. sda and ${DEVPART} with your partition name eg. sda5).

Related Topic