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/ssh/

swap

Swap of a Linux by SSH: size, usage, and pages swapped in and out per second.

  • linux
  • ssh
  • swap
  • memory
  • alpine
  • debian
  • fedora

par banshee1 installation2 versions

Swap of a Linux, by SSH

Returns the size of the swap, what it holds, and the pages read back from it and written to it per second. Pages read back again and again say the memory is too small, far better than used swap, where the kernel readily stores pages nobody needs any more.

How it works

The collector runs cat /proc/meminfo /proc/vmstat and reads SwapTotal and SwapFree (in KiB) and the counters pswpin and pswpout (pages since boot).

  • The pages per second come from the counters over the interval between two runs: the first run is skipped, as is a run where a counter went backwards.
  • Portable: both files are written by the kernel the same way on Alpine, Debian and Fedora. 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

OutputUnitMeaning
totalMiBswap size
usedMiBswap in use
used-percent%share of swap in use
swap-inpages/spages read back from swap
swap-outpages/spages written to swap

Watches

WatchKindDefaultsChecked
used-percent Swap saturatedabove, on used-percentwarning 80, critical 95, for 3 runsyes
swapping Sustained swappingabove, on swap-inwarning 100, for 5 minyes

Limits

  • A machine without swap (SwapTotal at 0) stops the collector misconfigured: the probe has nothing to measure, and says so rather than show green.
  • A page is 4 KiB on most machines, 16 or 64 KiB on some ARM systems: swap-in and swap-out count pages, not bytes.