Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up

Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More

  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4399Themes and Skins13Add-ons753Documentation283Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Configuration Wizards VMware Nagios XI Monitoring Wizard
3.5 (6)
234.8K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Yoann LAMY (7)Julien DESMAREST (6)Davide Lemma (4)deskwork_itunes142 (4)Chad Columbus (4)
See More
Newest Contributors
smolinux (1)juanfertor (1)zsoltaire (1)RavuAlHemio (1)sowoii (1)
See More

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > bikramjit singh
bs

bikramjit singh

@bikram

User Stats

Member Since: December 2, 2015

Favorites0

Views

Projects0

No Projects Found
Check mem (by Nestor@Toronto)

Modified a bit for Centos7

Centos 7 Free command output changed a bit, plus I would count cached memory as free. #!/bin/bash if [ "$1" = "-w" ] && [ "$2" -gt "0" ] && [ "$3" = "-c" ] && [ "$4" -gt "0" ]; then FreeM=`free -m` memTotal_m=`echo "$FreeM" |grep Mem |awk '{print $2}'` memUsed_m=`echo "$FreeM" |grep Mem |awk '{print $3}'` memFree_m=`echo "$FreeM" |grep Mem |awk '{print $4}'` memBuffer_cache_m=`echo "$FreeM" |grep Mem |awk '{print $6}'` memAvailable_m=`echo "$FreeM" |grep Mem |awk '{print $7}'` memUsed_m=$(($memTotal_m-$memFree_m-$memBuffer_cache_m)) memUsedPrc=`echo $((($memUsed_m*100)/$memTotal_m))||cut -d. -f1` if [ "$memUsedPrc" -ge "$4" ]; then echo "Memory: CRITICAL Total: $memTotal_m MB - Used: $memUsed_m MB - $memUsedPrc% used!|TOTAL=$memTotal_m;;;; USED=$memUsed_m;;;; BUFFER/CACHE=$memBuffer_cache_m;;;; AVAILABLE=$memAvailable_m;;;;" exit 2 elif [ "$memUsedPrc" -ge "$2" ]; then echo "Memory: WARNING Total: $memTotal_m MB - Used: $memUsed_m MB - $memUsedPrc% used!|TOTAL=$memTotal_m;;;; USED=$memUsed_m;;;; BUFFER/CACHE=$memBuffer_cache_m;;;; AVAILABLE=$memAvailable_m;;;;" exit 1 else echo "Memory: OK Total: $memTotal_m MB - Used: $memUsed_m MB - $memUsedPrc% used|TOTAL=$memTotal_m;;;; USED=$memUsed_m;;;; BUFFER/CACHE=$memBuffer_cache_m;;;; AVAILABLE=$memAvailable_m;;;;" exit 0 fi else # If inputs are not as expected, print help. sName="`echo $0|awk -F '/' '{print $NF}'`" echo -e "nntt### $sName Version 2.1###n" echo -e "# Usage:t$sName -w -c " echo -e "tt= warnlevel and critlevel is percentage value without %n" echo "# EXAMPLE:t/usr/lib64/nagios/plugins/$sName -w 80 -c 90" echo -e "nCopyright (C) 2012 Lukasz Gogolin ([email protected]), improved by Nestor 2015nn" exit fi

Reviewed 10 years ago

No Favorites Found

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile