I am writing an application which collects overall system I/O statistics. I was wondering whether the two counters for page-ins and page-outs,
pgpgin
pgpgout
in /proc/vmstat include pages written to, and read from all disk-based block devices attached to the system.
Please let me know, if you can!
The pages are written to and from the swap partitions; the numbers do not tell you which partition they were written to, only that a paging event occurred.
If you want to look at disk IO statistics, you should look at /proc/diskstats or /sys/block/*/stat for the block device IO counters.
This article on vmstat is helpful to understand what the paging counters mean: http://www.linuxjournal.com/article/8178
See the Linux source code, for example at http://lxr.free-electrons.com/source/block/blk-core.c?v=4.6 . There we find that the counters are maintained in the submit_bio()
function, which appears to count any disk i/o (see its uses at, for example, http://lxr.free-electrons.com/ident?v=4.6;i=submit_bio ), not to be confused with operating system paging (https://en.wikipedia.org/wiki/Paging).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With