NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Nagios plugin check_procs command fails



On Sun, Sep 19, 2010 at 5:36 AM, Dennis Wallberg <dennis%nordu.net@localhost> 
wrote:
> On 09/17/2010 05:55 PM, Greg Troxel wrote:
>>
>> Dennis Wallberg<dennis%nordu.net@localhost>  writes:
>>
>>
>>>
>>> bash-3.2# ps uaxww|egrep sendmail
>>> root     534  0.0  0.8  1264  3128 ?     Ss    1Aug10 1:26.43
>>> sendmail: accepting connections
>>> smmsp    535  0.0  0.3  1132   976 ?     Is    1Aug10 0:00.77
>>> sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue (sendmail)
>>> root   29454  0.0  0.1   804   324 ttyp0 R+    5:31PM 0:00.00 egrep
>>> sendmail (bash)
>>>
>>
>> so there is no process named sendmail.  There are two named "sendmail:".
>>
>>
>
> ok true... but I can run it on any process with the same error:
>
> $ /usr/pkg/libexec/nagios/check_procs -C "sendmail:"
> PROCS OK: 0 processes with command name 'sendmail:'
>
> $ ps auxww|egrep clamd
> defang   368  0.0  0.0  3256 93432 ?     IWsa  1Aug10 4:13.34
> /usr/pkg/sbin/clamd
>
> $ /usr/pkg/libexec/nagios/check_procs -C clamd
> PROCS OK: 0 processes with command name 'clamd'
>
> $ /usr/pkg/libexec/nagios/check_procs -C /usr/pkg/sbin/clamd
> PROCS OK: 0 processes with command name '/usr/pkg/sbin/clamd'
>
>
>

I believe this command works by calling 'ps' on the system.

You might be able to figure out the command line it uses and see for
sure with ktruss or similar and it should become very obvious which
flags are not working as expected.  Maybe using -vvv to check_procs
could also give clues.

(NetBSD's ps only supports BSD-style options)


Home | Main Index | Thread Index | Old Index