Expand description
Disks: how busy the busiest device is and how much each device
reads and writes, from /proc/diskstats; and how full the fullest
filesystem is, from statvfs (SRD-118 §3.2, §3.5).
Structs§
- Disk
Counters - One device’s cumulative counters from
/proc/diskstats. - Disk
Rate - What one device read and wrote over a sample window.
Functions§
- disk_
rates - Each device’s throughput between two snapshots
dt_sapart, for the devicescountedaccepts and that are in both snapshots. - is_
whole_ device - True for a device whose throughput is reported: a whole block
device (it has a directory in
/sys/block; a partition does not) that is not a loop, RAM or compressed-RAM device. - max_
disk_ util - The highest per-device utilization between two diskstats snapshots taken
dt_msapart. Devices present in only one snapshot are skipped (hotplug between samples); an empty intersection yieldsNone. - parse_
dev_ mounts - WRITABLE
/dev/-backed mount points from/proc/mounts, deduplicated by source device (bind mounts and btrfs subvolumes re-list one device many times; space is a per-DEVICE fact). - parse_
diskstats - Every device’s cumulative counters. Field layout per the kernel’s
Documentation/iostats:
major minor name <stat fields>, where reads completed is stat field 1, sectors read 3, writes completed 5, sectors written 7 and io_ticks 10 (whitespace tokens 3, 5, 7, 9 and 12).