Chinaunix

标题: nagios的检查zombie脚本怎么没有作用? [打印本页]

作者: caixicheng    时间: 2009-04-01 16:04
标题: nagios的检查zombie脚本怎么没有作用?
试着在工作站执行ps aux ,发现有不少标记为Z的进程
但是在nagios的check又没有提示,虽然这类进程只是占用了进程列表
可惜又看不懂里面的代码!!!!!
作者: chenl    时间: 2009-04-09 12:33
check_procs可以检查zombie进程:

--help中的有关Optional Filters的介绍:

-s, --state=STATUSFLAGS
   Only scan for processes that have, in the output of `ps`, one or
   more of the status flags you specify (for example R, Z, S, RS,
   RSZDT, plus others based on the output of your 'ps' command).

比如:
/opt/nagios/libexec/check_procs -w 5 -c 10 -s Z
PROCS OK: 0 processes with STATE = Z
作者: caixicheng    时间: 2009-04-09 14:13
标题: 回复 #2 chenl 的帖子
是可以啊,就是老显示为0
但是我用ps查看却有不少呢
作者: chenl    时间: 2009-04-10 12:28
标题: 回复 #3 caixicheng 的帖子
你需要check的是什么操作系统?
作者: caixicheng    时间: 2009-04-10 12:45
标题: 回复 #4 chenl 的帖子
check的是solaris
作者: chenl    时间: 2009-04-11 13:01
你的Solaris是什么版本的?
默认的procs编译可能会有一些问题。

给你提供一个OK的版本,for SunOS 5.10的。

-bash-3.00$ ./check_procs.fix -w 5 -c 10 -s Z
PROCS OK: 3 processes with STATE = Z
-bash-3.00$ uname -a
SunOS t1000 5.10 Generic_118833-33 sun4v sparc SUNW,Sun-Fire-T1000 Solaris

check_procs.fix.gz

117.06 KB, 下载次数: 28


作者: caixicheng    时间: 2009-04-16 09:41
标题: 回复 #6 chenl 的帖子
我的是5.9和5.8的




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2