Module Munin_sys.Disk_io
Disk I/O statistics.
type t = {bytes_read : int64;(*Total bytes read from disk.
*)bytes_written : int64;(*Total bytes written to disk.
*)time_ms : int64;(*Cumulative I/O time in milliseconds.
*)num_disks : int64;(*Number of physical disks included in aggregation.
*)
}Cumulative disk I/O counters since boot.
Aggregates physical disks only, excluding virtual devices, partitions, and metadata devices. Counters are cumulative and monotonically increasing until system reboot.
Platform behavior:
- Linux: Excludes virtual devices (
dm-*,loop*,md*,zram*) and partitions (detected by prefix matching the parent device name).
type stats = {read_bytes_per_sec : float;(*Read rate in bytes per second.
*)write_bytes_per_sec : float;(*Write rate in bytes per second.
*)utilization_percent : float;(*Disk utilization percentage (0.0 to 100.0).
*)
}Disk I/O rates and utilization computed between two samples.
val sample : unit -> tsample () returns cumulative disk I/O counters.
Only physical disks are included; partitions and virtual devices are excluded.
compute ~prev ~next ~dt calculates disk I/O rates and utilization between two samples.
Computes the delta for each counter and divides by dt to obtain rates per second. Utilization is calculated as (time_delta / (dt * 1000 * num_disks)) * 100, representing the percentage of time disks were actively performing I/O, capped at 100.0.
If num_disks is 0L, utilization_percent is 0.0.