[Nagiosplug-devel] oddity about check_procs plugin and solaris

Philip Brown ppb at usc.edu
Wed Mar 25 23:05:55 CET 2009


I've been compiling nagios-plugins version 1.4.13 on solaris.

I noticed with distaste the "pst3" hack. which requires being installed as 
ROOT??

I find this nasty, since /bin/ps itself does not require root.
So I've been attempting to get the pluging to work "the old fashioned way", 
calling ps.

it SEEMS like it should work.
looking at debug output, etc, etc.

/usr/bin/ps -Ao 's uid pid ppid vsz rss pcpu comm args'

seems to give all the information needed.
sample output:

S     0 15175     1 11304 6832  0.4 /usr/lsd/kerberos/5-1.4.1/sbin/krb5kdc 
                                          /usr/lsd/kerberos/5-1.4.1/sbin/krb5kdc


HOWEVER: the -vvv output from check_procs, parses this as


CMD: /usr/bin/ps -Ao 's uid pid ppid vsz rss pcpu comm args'
    ....
proc#=0 uid=0 vsz=11304 rss=6832 pid=15175 ppid=1 pcpu=0.30 stat=
S etime= prog=krb5kdc args= 
/usr/lsd/kerberos/5-1.4.1/sbin/krb5kdc

(note how "prog" gets inexplicably truncated to `basename`, instead of full 
path?!!)

This is particularly troublesome, since we have previously been checking if 
prog is running with

check_procs -C /usr/lsd/kerberos/5-1.4.1/sbin/krb5kdc

Why is chgeck_procs truncating the prog path like that, when the raw PS 
command is clearly NOT truncating?!






More information about the Devel mailing list