NAME
Monitoring::Sneck::Checks::memory - checks how much memory is used
VERSION
Version 0.0.1
SYNOPSIS
memory|perl:memory
memory_zfs|perl:memory -a -w 85 -c 95
DESCRIPTION
Checks the percent of memory used, which is what is not available to start new programs with. On Linux that is MemAvailable from /proc/meminfo, or MemFree, Buffers, and Cached added up on kernels without it. On FreeBSD it is the free and inactive pages, through BSD::Sysctl. Other OSes are UNKNOWN.
The ZFS ARC counts as used on both, as the kernel does not count it as available, though most of it can be given back. --arc counts what it holds over its minimum as available.
OPTIONS
- -w, --warning :: Range of percent used. Default :: 90
- -c, --critical :: Range of percent used. Default :: 95
- -a, --arc :: Count the ZFS ARC over its minimum as available.
METHODS
check
Does the check.
memory
Returns the bytes of memory in total and available. Dies if they can not be found.
arc_spare
Returns the bytes the ZFS ARC holds over its minimum, 0 if there is no ARC.