Open nicolasb827 opened 8 months ago
Thanks for looking at this. When the code considers vda and vda1 counters is there a clear difference in the major and minor numbers, or do we need to pull in something else to help discern?
This code has not been looked at for some time so there may be other new constructs and filesystems to take into account. Or it may be better to start with the cgroup stats under /sys if io-accounting is enabled. Probably worth looking around to see where the most reliable totals can be found.
Hello, looking at
src/Linux/readDiskCounters.c
, and digging into/proc
filesystem, I think there is an error on computations. From my point of view, using kernel 3.10.0-1127.10.1.el7.x86_64, if I do a cat diskstat, I have:LIne 1 we have /dev/vda and line 2 /dev/vda1, which is a partition of /dev/vda:
So, looking at code, I am pretty sure that total of read/writes are vda + vda1, but, I think that reads of vda1 are compound into value of vda's reads. So, result seems to be incorrect. I tried to fix that by myself, but it seems that it is much more complicated.
The code that does total is:
(lines 94 -> 106)
And I think that the second problem is that VirtIO devices in this particular case are ignored of computation?