Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_free_mem

Rating
0 votes
Favoured:
0
Current Version
0.93
Last Release Date
2014-10-31
Compatible With
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
License
GPL
Hits
18093
Files:
FileDescription
check_free_memcheck_free_mem version 0.93
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
check_free_mem is a Nagios plugin for checking memory and swap usage on Linux and UNIX platforms. It uses the output of "free" command and needs only grep and awk - no Perl, Python, PHP or SNMP.
It has separate thresholds (warning and critical) for RAM and swap usage. The script makes all internal processing with float numbers, so the thresholds may be specified as float numbers for an increased precision.
It reports the following performance data:
- total, used, free, shared, buffered and cached memory (as an absolute number and in percents)
- total, used and free swap (as an absolute number and in percents)

The w (warning) and c (critical) thresholds refer to the real free memory which is calculated as:
free memory + cached memory

The W (warning) and C (critical) thresholds refer to the free swap.

Usage:
check_free_mem [-v] [-h] [-w MemWarning] [-c MemCritical] [-W SwapWarning] [-C SwapCritical]

Options:
--version|-v)
prints the program version
--help|-h)
prints this help information
-w)
specifies the warning threshold for free+cached memory
-c)
specifies the critical threshold for free+cached memory
-W)
specifies the warning threshold for free swap
-C)
specifies the critical threshold for free swap

Example:

# ./check_free_mem -w 20 -c 10 -W 5 -C 10

OK; Memory: total 996.8MB, used 272.0MB (27.3%), free 724.9MB (72.7%), shared 0B (0.0%), buffers 69.1MB (6.9%), cached 116.3MB (11.7%), free+cached 841.1MB (84.4%); Swap: total 1024.0MB, used 0B (0.0%), free 1024.0MB (100.0%) | 'used memory'=285175808B;;;0;1045245952 'free memory'=760070144B;;;0;1045245952 'shared memory'=0B;;;0;1045245952 'buffers memory'=72458240B;;;0;1045245952 'cached memory'=121917440B;;;0;1045245952 'free+cached memory'=881987584B;209049190;104524595;0;1045245952 'used swap'=0B;107373363;107373363;0;1073733632

=============
Oct. 31, 2014 What's new in version 0.93
- the path for binary executables is no more hard coded, which makes the script capable to run on virtually any Linux or UNIX system, without the need to edit it.
- the path for binary executables (grep, awk, free) can be overwritten in the parameters section, at the beginning of the script