[Nagiosplug-devel] oddity about check_procs plugin and solaris
Philip Brown
ppb at usc.edu
Thu Mar 26 19:35:20 CET 2009
Andreas Ericsson wrote:
> Philip Brown wrote:
>>
>> Why is check_procs truncating the prog path like that, when the raw PS
>> command is clearly NOT truncating?!
>>
>
> Again, it may not.
Comparisons:
$ ./check_procs -C /usr/lsd/nagios/nrpe/default/sbin/nrpe
PROCS OK: 0 processes with command name '/usr/lsd/nagios/nrpe/default/sbin/nrpe'
$ ./check_procs -C nrpe
PROCS OK: 1 process with command name 'nrpe'
And just for grins as a comparison:
$ ./check_procs -a /usr/lsd/nagios/nrpe/default/sbin/nrpe
PROCS OK: 1 process with args '/usr/lsd/nagios/nrpe/default/sbin/nrpe'
As mentioned before, the raw ps output, as shown by check_procs -vvv,
clearly shows that the ps output is valid.
When I run it by hand myself, i get
S 84965 7985 1 4096 1432 0.0 /usr/lsd/nagios/nrpe/default/sbin/nrpe
/usr/lsd/nagios/nrpe/default/sbin/nrpe -c /usr/lsd/nagios/nrpe/default/etc/nrpe
And "check_procs -vvv |grep nrpe" also shows
S 84965 7985 1 4096 1432 0.0 /usr/lsd/nagios/nrpe/default/sbin/nrpe
/usr/lsd/nagios/nrpe/default/sbin/nrpe -c /usr/lsd/nagios/nrpe/default/etc/nrpe
(CMD: /usr/bin/ps -Ao 's uid pid ppid vsz rss pcpu comm args')
So the fault is clearly not in ps or the arguments thereof.
From config.h, the auto-detected configs are:
#define PS_COLS 9
#define PS_COMMAND "/usr/bin/ps -Ao 's uid pid ppid vsz rss pcpu comm args'"
#define PS_FORMAT "%s %d %d %d %d %d %f %s%n"
#define PS_VARLIST
procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos
More information about the Devel
mailing list