[Nagiosplug-devel] [ nagiosplug-Bugs-1280470 ] check_procs cannot detect zombies on AIX

SourceForge.net noreply at sourceforge.net
Tue Oct 17 13:34:34 CEST 2006


Bugs item #1280470, was opened at 2005-09-02 11:35
Message generated for change (Comment added) made by wszenajch
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1280470&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parsing problem
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew Elwell (elwell2000)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_procs cannot detect zombies on AIX

Initial Comment:
./check_procs -s Z -v  
Not parseable: Z           188558   98382            
<defunct> <defunct>
Not parseable: Z           196776   98382            
<defunct> <defunct>
PROCS OK: 0 processes with STATE = Z


should return 2 zombies - AIX lists them as <defunct>

>> ps auxwww | egrep "USER|def"
USER         PID %CPU %MEM   SZ  RSS    TTY STAT   
STIME  TIME COMMAND
root      188558                            Z         
    0:00 <defunct>
root      196776                            Z         
    0:00 <defunct>


>> ps -efal  | egrep "UID|def"
       F S      UID     PID    PPID   C PRI NI ADDR   
SZ    WCHAN    STIME    TTY  TIME CMD
   50005 Z     root  188558   98382   0  60 20        
                             0:00 <defunct>
   50005 Z     root  196776   98382   0  60 20        
                             0:00 <defunct>


----------------------------------------------------------------------

Comment By: wszenajch (wszenajch)
Date: 2006-10-17 13:34

Message:
Logged In: YES 
user_id=1622130

For nagios-plugins-HEAD-200610152352 I have made the
following correction to make this plugin working correctly
with processes on AIX 5.2:

In file check_procs.c find line:
if ( cols == (expected_cols - 1) && strstr(procstat, zombie) ) {

and replace it with the following:
if ( cols < expected_cols  && strstr(procstat, zombie) ) {

On AIX 5.2 it works correctly reporting total number of
processes (which was wrong before this change) and number of
zombie processes when option '-s Z' is used.

This change does not seem to affect Linux systems: I made
brief tests with OpenSUSE10.1 i386, SuSE 10.0 x86_64 and
SLES10 ia64; but other platforms i.e. Solaris should be
tested before applying this change for production.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1280470&group_id=29880




More information about the Devel mailing list