[root@wqk1 mnt]# ./check_memory.pl -h
nagios——check_memory.pl脚本测试
原创
©著作权归作者所有:来自51CTO博客作者151wqooo的原创作品,请联系作者获取转载授权,否则将追究法律责任
check_mem.pl v1.0 - Nagios Plugin
usage:
check_mem.pl -<f|u> -w <warnlevel> -c <critlevel>
options:
-f Check FREE memory
-u Check USED memory
-C Count OS caches as FREE memory
-w PERCENT Percent free/used when to warn
-c PERCENT Percent free/used when critical
Copyright (C) 2000 Dan Larsson <dl@tyfon.net>
check_mem.pl comes with absolutely NO WARRANTY either implied or explicit
This program is licensed under the terms of the
GNU General Public License (check source code for details)
=========================
[root@wqk1 mnt]# ./check_memory.pl -u -w 50 -c 90
WARNING - 66.7% (1372716 kB) used!|TOTAL=2059580KB;;;; USED=1372716KB;;;; FREE=686864KB;;;; CACHES=1181796KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -u -w 60 -c 90
WARNING - 66.7% (1372716 kB) used!|TOTAL=2059580KB;;;; USED=1372716KB;;;; FREE=686864KB;;;; CACHES=1181792KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -u -w 70 -c 90
OK - 66.7% (1372716 kB) used.|TOTAL=2059580KB;;;; USED=1372716KB;;;; FREE=686864KB;;;; CACHES=1181792KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -u -w 40 -c 50
CRITICAL - 66.7% (1372840 kB) used!|TOTAL=2059580KB;;;; USED=1372840KB;;;; FREE=686740KB;;;; CACHES=1181796KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -u -w 40 -c 60
CRITICAL - 66.8% (1374772 kB) used!|TOTAL=2059580KB;;;; USED=1374772KB;;;; FREE=684808KB;;;; CACHES=1181804KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -u -w 40 -c 70
WARNING - 66.7% (1372840 kB) used!|TOTAL=2059580KB;;;; USED=1372840KB;;;; FREE=686740KB;;;; CACHES=1181808KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -f -w 50 -c 40
CRITICAL - 33.3% (686740 kB) free!|TOTAL=2059580KB;;;; USED=1372840KB;;;; FREE=686740KB;;;; CACHES=1181800KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -f -w 50 -c 30
WARNING - 33.3% (686864 kB) free!|TOTAL=2059580KB;;;; USED=1372716KB;;;; FREE=686864KB;;;; CACHES=1181800KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -f -w 50 -c 20
WARNING - 33.3% (686864 kB) free!|TOTAL=2059580KB;;;; USED=1372716KB;;;; FREE=686864KB;;;; CACHES=1181816KB;;;;
[root@wqk1 mnt]# ./check_memory.pl -f -w 30 -c 20
OK - 33.3% (686740 kB) free.|TOTAL=2059580KB;;;; USED=1372840KB;;;; FREE=686740KB;;;; CACHES=1181828KB;;;;
附脚本:
![](https://ucenter.51cto.com/images/noavatar_middle.gif)
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
nagios check_memory 插件开发
nagios自定义插件:check memory
nagios 插件开发 check momory -
sing NAGIOS to Check the Physical Memory Available on a Windows Host
By default the CheckNT command checks the virtual memory on a Windows server. So for example, if your server had 4GB of physical memory and a 4GB page file NAGIOS and CheckNT would see 8GB of physical
Windows physical default available critical -
linux memory check commands
For checking the memory as in R
linux less html