I want to monitor the io performance of a linux system, particularly the read performance. The iostat command gives await and svctim for both reads and writes combined which is not suitable for me.
The file /proc/diskstats gives in column 1 the # of reads completed and in column 4 the # milliseconds spent reading. Columns I would figure that column 4 divided by column 1 would give me the average read time. My idea is to sample it every x seconds and do the calculation.
For the writes I will take columns 5 and 8.
Is this the right approach? Are the any caveats?
Regards