|
The "sectors" that are listed in the disk data come from /proc/diskstats. These same counters can be found in /sys/block/<x>/stat. The "sectors" field is in system-independent 512 byte increments. It is a simple transformation to multiple sectors by 512 in order to return bytes. To quote the documentation:
read sectors, write sectors
===========================
These values count the number of sectors read from or written to this
block device. The "sectors" in question are the standard UNIX 512-byte
sectors, not any device- or filesystem-specific block size. The
counters are incremented when the I/O completes.
Documentation:
http://lxr.free-electrons.com/source/Documentation/block/stat.txt#L49
Source:
/sys/block/<x>/stat: http://lxr.free-electrons.com/source/block/partition-generic.c#L112
/proc/diskstats: http://lxr.free-electrons.com/source/block/genhd.c#L1177
Shift the code does:
http://lxr.free-electrons.com/source/include/linux/bio.h#L99
|