Linux
banshee/linux-collection/linux/snmp/
diskio
Disk input/output of a Linux host by SNMP: IOPS, throughput and busy time per disk.
par banshee1 installation2 versions
Disk input/output of a Linux host, by SNMP
Returns, for each disk, the reads and writes per second, their throughput, and the share of time the disk is busy. Two watches are offered, each adjustable on the probe.
How it works
The collector reads diskIOTable (UCD-DISKIO-MIB), which net-snmp serves from /proc/diskstats: per device, the number of reads and writes, the bytes read and written, and the microseconds spent busy.
- Everything comes from counters, over the interval between two runs: on the first run there is no previous reading, and nothing is returned for that disk; the values come on the next run.
- A partition is left out by the code, since its input/output is already counted on its disk: a device whose name is another device's name followed by digits (
sda1,vdb2) or bypand digits (nvme0n1p1,mmcblk0p2). - Loop, in-memory and optical devices are left out by the default selection: everything except
loop*,ram*,zram*,sr*andfd*. Device-mapper volumes (dm-*, LVM) and software RAID (md*) are kept. The selection can be changed on the probe. - Busy time comes from
diskIOBusyTime, which recent agents serve: without it, the busy share is not returned. - A host whose agent serves no disk table stops the collector as misconfigured.
Prerequisites
snmpd(net-snmp) running on the host, built with theucd-snmp/diskiomodule (the case in the main distributions), listening on an address the poller reaches (UDP 161), with the firewall open to the poller only.- The view granted to the poller includes
diskIOTable(.1.3.6.1.4.1.2021.13.15). - Read-only access, SNMPv2c or SNMPv3, set on the host or one of its folders (
protocol:snmp:*variables).
# /etc/snmp/snmpd.conf
agentaddress udp:161
view banshee included .1.3.6.1.4.1.2021.13.15
rocommunity <community> 192.0.2.10 -V banshee
# or: rouser <user> priv -V banshee Outputs
| Name | Label | Unit | Per |
|---|---|---|---|
read-ops | Reads | op/s | disk |
write-ops | Writes | op/s | disk |
ops | Operations | op/s | disk |
read-rate | Read throughput | MiB/s | disk |
write-rate | Write throughput | MiB/s | disk |
busy | Busy time | % | disk |
Watches
| Watch | Kind | Defaults | Checked |
|---|---|---|---|
| Disk saturated | Above a threshold, on busy | warning 90 %, for 5 min | yes |
| Too many operations | Above a threshold, on ops | no threshold | no |
Limits
- The operation counts are 32-bit counters: on a busy disk they wrap, and the run where they do returns nothing for that disk.
- Neither latency nor queue length is served by this MIB.
- A disk that is always busy is not always saturated: an SSD or an array serves many requests at once, and reaches 100 % well before its limit.