Search notes:

/proc/diskstats

/proc/diskstats displays the I/O statistics of block devices.
As far as I can tell, /proc/diskstats is one of or the major source of data for iostat (and possibly also for sar).
Each line in /proc/diskstats contains the following 18 fields: All values except the first three and I/Os currently in progress are cumulative since startup.
1 major number
2 minor number
3 device name
4 reads completed successfully
5 reads merged
6 sectors read
7 time spent reading (ms)
8 writes completed
9 writes merged
10 sectors written
11 time spent writing (ms)
12 I/Os currently in progress The only (statitical) value that is not cumulative since startup.
13 time spent doing I/Os (ms)
14 weighted time spent doing I/Os (ms)
15 discards completed successfully Added in Linux 4.18+ for discard tracking.
16 discards merged Added in Linux 4.18+ for discard tracking.
17 sectors discarded Added in Linux 4.18+ for discard tracking.
18 time spent discarding Added in Linux 4.18+ for discard tracking.
19 flush requests completed successfully Added in Linux 5.5+ for flush requests
20 time spent flushing Added in Linux 5.5+ for flush requests

See also

/sys/block/_device_/stat`
/proc/mdstat, /proc/stat, /proc
The kernel source documentation files
This example uses the Python library curses to print the stats found in /proc/diskstats in regular intervals to the console.

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Linux/fh...', 1740453523, '18.221.81.158', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Linux/fhs/proc/diskstats(78): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78