[Nagiosplug-help] check_procs and check_zombie, error

Ben Clewett ben at clewett.org.uk
Thu Feb 24 01:05:14 CET 2005


Andreas,

You gave me the inspiration for the fix.  SUSE 9.1 uses a version of 
'ps' which does not like the '-'.  I edited config.h to change:

#define PS_COMMAND "/bin/ps -axwo 'stat uid ppid vsz rss pcpu comm args'"

To:

#define PS_COMMAND "/bin/ps axwo 'stat uid ppid vsz rss pcpu comm args'"

All now works perfectly.

If I knew more about 'autoconf' I would offer a better fix.  As a start 
I can see the environment variables:

BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" 
[5]="i586-suse-linux")
MACHTYPE=i686-suse-linux

Hope this is of some use.

Regards, Ben.



Andreas Ericsson wrote:
> Ben Clewett wrote:
> 
>> Sorry if asked before.
>>
>> I have new installation, SUSE 9.1 uptodate to 23/Feb/05 with plugins 
>> 1.4.  Compiled check_zombie and check_procs.
>>
>> Both return:
>>
>> stdout: System call sent warnings to stderr
>> stderr: PROCS WARNING: 0 processes with STATE = Z
>>
>> Nagios only reports the stdout part.
>>
>> I would be happy to try and hack the code, but I need this working for 
>> a server ASAP, so that may have to wait :)
>>
>> Before that, may I ask if any member know of a reason for this behaviour?
>>
> 
> If this is ps's doing, then this violates posix and sus. Posix/Unix 
> programs should only print critical errors to stderr (strace and ltrace 
> are not posix/unix programs). In that case you should file a bug report 
> with SUSE.
> 
> What happens if you run the command as it is in the code and pipe stdout 
> to /dev/null? It might be a reading/opening error in the plugin after all.
> 





More information about the Help mailing list