[root@245557-web4 etc]# /usr/local/nagios/libexec/check_mem.sh --help
Wrong Syntax: check_mem.sh --help
Usage: check_mem.sh [-w|--warning]<percent free> [-c|--critical]<percent free>
[root@245557-web4 etc]# /usr/local/nagios/libexec/check_mem.sh -w 3 -c 4
/usr/local/nagios/libexec/check_mem.sh: line 59: machinfo: command not found
(standard_in) 1: parse error
(standard_in) 2: parse error
(standard_in) 1: parse error
(standard_in) 2: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 1%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 2%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 1%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 2%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 1%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 2%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 1%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 2%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 1%3: integer expression expected
/usr/local/nagios/libexec/check_mem.sh: line 119: [: 2%3: integer expression expected
OK - Memory usage: total: MB - used: MB(%) - free: MB(%);Top 5 Memory Processes(memKB,pname,pid): 138062 mysqld 2643, 80454 cvd 3169, 76292 httpd 19706, 76043 httpd 18358, 76043 httpd 16573|Memory usage=MB;;;0;
答案 0 :(得分:0)
'check_mem.sh'脚本未得到很好的维护。使用'check_mem.pl',这可以在最新版本的nagios-plugins的'contrib'文件夹中找到。可从以下地址获取:http://www.nagios.org/download/plugins