check_procs issue on Solaris

J.R. Taisto jr at e-integration.net
Tue Mar 27 00:25:56 CEST 2007


     The issue I seem to be running into with the Nagios
check_procs plugin is the fields for "ps -alxwwn" sometimes
merge into each other.  I haven't figured out yet how to make
"ps" not do this.  See below:

# /usr/ucb/ps -alxwwn | more
 F   UID   PID  PPID %C PRI NI   SZ  RSS    WCHAN S TT       
TIME COMMAND
 1     0     0     0  0  96  0    0    0          T ?        
0:36 sched
 0     0     1     0  0  59 20 2384  576 600063d04aa S ?     
  44:43 /sbin/init
 1     0     2     0  0  98  0    0    0 018fae68 S ?        
0:00 pageout
 1     0     3     0  0  60  0    0    0 01910d78 S ?       
2026:54 fsflush
 0     0     7     1  0  59 2022160 2416 3000327b166 S ?     
   2:07 /lib/svc/bin/svc.startd
 0     0     9     1  0  59 2010544 2160 3000327a806 S ?     
   0:54 /lib/svc/bin/svc.configd


This explains why check_procs doesn't work as expected on
Solaris.  See example below:

# ps -ef | wc -l
     896

# ./check_procs --version
check_procs (nagios-plugins 1.4.6) 1.58
 
# ./check_procs -w 5 -c 10 -t 30
PROCS CRITICAL: 232 processes

 # ./check_procs -w 5 -c 10 -t 30 -vvv | more
CMD: /usr/ucb/ps -alxwwn
 1     0     0     0  0  96  0    0    0          T ?        
0:36 sched
proc#=0 uid=0 vsz=0 rss=0 pid=0 ppid=0 pcpu=0.00 stat=T etime=
prog= args=sched
 0     0     1     0  0  59 20 2384  576 600063d04aa S ?     
  44:43 /sbin/init
proc#=1 uid=0 vsz=2384 rss=576 pid=1 ppid=0 pcpu=0.00 stat=S
etime= prog= args=/sbin/init
 1     0     2     0  0  98  0    0    0 018fae68 S ?        
0:00 pageout
proc#=2 uid=0 vsz=0 rss=0 pid=2 ppid=0 pcpu=0.00 stat=S etime=
prog= args=pageout
 1     0     3     0  0  60  0    0    0 01910d78 S ?       
2027:07 fsflush
...
... Here's an example of some of the nonparsable stuff:
...
 0   110   234     1  0  59 2043902084249176 30073ad758a S ? 
       0:00 oraclePRD (LOCAL=NO)
Not parseable:  0   110   234     1  0  59 2043902084249176
30073ad758a S ?         0:00 oraclePRD (LOCAL=NO)

Note the "Not parseable:" tag.  Do you have any
recommendations?  I'm thinking I need not use the ucb version
of "ps," but I'm not sure that is necessarily the right
decision if that seems to be the preferred version of "ps" for
this plugin.  All help is appreciated.  Thanks.



--
J.R. Taisto
UNIX Consultant
jr at e-integration.net

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV




More information about the Developers mailing list