Linux
banshee/linux-collection/linux/ssh/
diskio
Disk activity of a Linux by SSH: IOPS, throughput, wait and busy time per disk, from /proc/diskstats.
by banshee1 installation2 versions
Disk activity of a Linux, by SSH
Returns, for each disk, the reads and writes per second, the read and write throughput, the mean wait of a read and of a write, and the share of time the disk was busy.
How it works
The collector runs ls /sys/block (the whole disks) and cat /proc/diskstats (the counters of each disk and partition since boot).
- Only the disks of
/sys/blockare measured: it never lists partitions, whatever their name (sda1,nvme0n1p1,mmcblk0p1). - Every value comes from counters over the interval between two runs: the first run is skipped, and a disk whose counters went backwards is left out of that run.
- The mean wait is the time spent on reads (writes) divided by their number; a disk without reads (writes) in the interval has no wait value.
- Portable: both are written by the kernel the same way on Alpine, Debian and Fedora; a sector in
/proc/diskstatsis always 512 bytes. Nothing is written on the target.
Prerequisites
- an SSH account for monitoring, without write rights;
- the fingerprint of the server's host key, set in
protocol:ssh:fingerprint(not needed when the Security settings trust the first SSH fingerprint presented).
Outputs
| Output | Unit | Per | Meaning |
|---|---|---|---|
read-iops, write-iops | op/s | disk | reads and writes completed |
read-rate, write-rate | MiB/s | disk | throughput |
read-wait, write-wait | ms | disk | mean wait of an operation, queue included |
busy | % | disk | share of time with at least one operation in progress |
By default, loop*, ram*, zram*, sr*, fd* and nbd* are left out; the selection is changed on the probe.
Watches
| Watch | Kind | Defaults | Checked |
|---|---|---|---|
read-latency Slow reads | above, on read-wait | warning 50, critical 200, for 5 min | yes |
write-latency Slow writes | above, on write-wait | warning 50, critical 200, for 5 min | yes |
busy Disk saturated | above, on busy | warning 90, for 10 min | no |
Limits
busyonly means something for a disk that serves one operation at a time: an SSD or NVMe at 100 % may still serve many more. That is why it is not checked.- LVM and RAID volumes (
dm-*,md*) are measured beside the disks under them: their activity is counted twice, once per layer.