[Nagiosplug-help] check_procs not using ps wide on OSX

kyle smith kyles at apple.com
Fri Mar 28 22:31:18 CET 2008


Hello Plugin Gurus,

OS version: OSX 10.4.11
plugin version: 1.4.11 and 3/28/08 trunk build

I need to verify some java processes are running which have very long  
command and arguments. These processes do not show enough data to be  
uniquely identified  unless you run "ps auxwww" (need 3 w's).  
Check_procs doesn't seem to notice procs like this but does catch a  
proc which has an -i flag so I think it's not running auxwww...

hosta:/usr/local/nagios/libexec root# ./check_procs -c 1:1 -a "- 
Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml"
PROCS CRITICAL: 0 processes with args '-Dlog4j.configuration=file:../ 
conf/teamcity-agent-log4j.xml'
hosta:/usr/local/nagios/libexec root# ./check_procs -c 1:1 -a "-i"
PROCS OK: 1 process with args '-i'

So I need to get check_procs to use ps auxwww - no problem I'll use  
the configure option "--with-ps-command=/bin/pswide" to tell it to  
use a custom ps command I'll write called /bin/pswide.

So I run configure with the proper flag and catch the output in a log  
file...

hosta:~/downloads/nagios-plugins-trunk-200803281300 root# ./configure  
--with-ps-command=/bin/pswide > configure.log 2>&1

But looking in the log file it seems configure still wants to use the  
same ps call as when running without the --with-ps-command flag...

hosta:~/downloads/nagios-plugins-trunk-200803281300 root# grep ps  
configure.log
checking for ps... /bin/ps
checking for ps syntax... /bin/ps -axwo 'stat uid pid ppid vsz rss  
pcpu ucomm command'
checking for lsps... no
checking for pstat_getdynamic... no

And indeed when I make and install the plugin still does not notice  
the java processes with the long command names and arguments.

I see configure supports the --with-ps-command flag...

hosta:~/downloads/nagios-plugins-trunk-200803281300 root# ./configure  
-h | grep ps-command
   --with-ps-command=PATH  Verbatim command to execute for ps

Any ideas?

thanks

kyle smith



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20080328/c6dc8354/attachment.html>


More information about the Help mailing list