This JIRA collects bytes read/written from/to disks in Linux.
Step 1: We exploit the "/proc/diskstats" counters, extract the number of sectors read/written for every disk, and return the aggregation of these counters among all the disks.
Step 2: To convert sectors into bytes, for every disk, we extract the sector size from "/sys/block/diskName/queue/hw_sector_size".
Step 3: Finally by multiplying the number of sectors from Step 1 with sector size from Step 2 we compute the number of bytes.
We tested the existence of these files in the following Linux kernel versions:
Also, doing further search on the web, it seems people are using/recommending these files for extracting read/written disks counters