banshee est en développement actif : les collecteurs vont encore changer, et une version que vous publiez demandera sans doute des ajustements. Pour un usage stable, attendez la version 1.0.0.

Linux

banshee/linux-collection/linux/snmp/

swap

Swap of a Linux host by SNMP: size, used and free.

  • linux
  • snmp
  • swap
  • memory
  • net-snmp

par banshee1 installation2 versions

v2Dernière

Publiée le 28 octobre 2026. One naming convention across collections; documentation completed.

Swap of a Linux host, by SNMP

Returns the size of the swap, the swap used and free, and the share used. Two watches are offered, each adjustable on the probe.

Versions

Generic: the memory group of UCD-SNMP-MIB is served the same way by net-snmp on any Linux.

How it works

The collector reads memTotalSwap and memAvailSwap (the free swap), in KiB, from the memory group of UCD-SNMP-MIB.

  • A machine without swap says so by a size of zero: the collector returns zero everywhere, a measurement and not a failure, and no watch raises.

Prerequisites

  • snmpd (net-snmp) running on the host, listening on an address the poller reaches (UDP 161), with the firewall open to the poller only.
  • The view granted to the poller includes the memory group of UCD-SNMP-MIB (.1.3.6.1.4.1.2021.4).
  • 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.4
rocommunity <community> 192.0.2.10 -V banshee
# or: rouser <user> priv -V banshee

Outputs

NameLabelUnitPer instance
totalSwap sizeMiBno
usedUsed swapMiBno
freeFree swapMiBno
used-percentUsed swap%no

Watches

NameTitleKindDefaultsChecked by default
swap-highSwap saturatedabove a threshold, on used-percentwarning above 80 %, critical above 95 %, for 3 runsyes
freeLittle free swapbelow a threshold, on freecritical below 512 MiB; no warningno

Limits

  • Swap in use is not swapping activity: a machine can hold idle pages in swap for weeks without harm. The rate of pages swapped in and out is not served by this MIB.
  • These values are 31 bits wide in KiB: beyond 2 TiB of swap, the agent itself miscounts them.