banshee is under active development: collectors will keep changing, and a version you publish will likely need adjustments. For stable use, wait for version 1.0.0.

Linux

banshee/linux-collection/linux/snmp/

memory

Physical memory of a Linux host by SNMP, buffers and cache counted as available.

  • linux
  • snmp
  • memory
  • net-snmp

by banshee1 installation2 versions

Memory of a Linux host, by SNMP

Returns the physical memory, the memory used and available, the buffers and cache, and the share used. Two watches are offered, each adjustable on the probe. Swap is the linux/snmp/swap collector.

How it works

The collector reads the memory group of UCD-SNMP-MIB: memTotalReal, memAvailReal (the free memory), memBuffer, memCached and, when the agent serves it, memSysAvail, in KiB.

  • Available memory is the kernel's own estimate, MemAvailable, which net-snmp 5.9 and later serve as memSysAvail; the source output then reads memavailable.
  • An older agent does not serve it: available memory is then free memory plus buffers and cache, which the kernel gives back as soon as an application asks, and source reads free-buffers-cache. Either way, a machine whose cache fills its memory is not saturated.
  • Used memory is the total minus the available memory.
  • A total of zero stops the collector as misconfigured: it never shows green on nothing.

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

NameLabelUnit
totalPhysical memoryMiB
usedUsed memoryMiB
availableAvailable memoryMiB
cacheBuffers and cacheMiB
used-percentUsed memory%
sourceSource of available memory: memavailable or free-buffers-cache

Watches

WatchKindDefaultsChecked
Memory saturatedAbove a threshold, on used-percentwarning 90 %, critical 95 %, for 3 runsyes
Low available memoryBelow a threshold, on availablecritical 512 MiBno

Limits

  • With the fallback (free-buffers-cache), the part of the cache the kernel cannot give back (shared memory, tmpfs) counts as available: on a machine with a large tmpfs, available memory is overestimated. MemAvailable discounts it.
  • Total, free, buffers and cache are 31 bits wide in KiB: beyond 2 TiB of memory, the agent itself miscounts them.