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 Mon, Sep 20, 2010 at 7:22 AM, Dennis Wallberg <dennis%nordu.net@localhost> 
wrote:
> On 09/19/2010 04:16 PM, matthew sporleder wrote:
>>
>> 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)
>>
>
> This is what the plugin runs:
>
> bash-3.2# /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args'|egrep
> sendmail
> Ss      0   534     1  1264  3128  0.0 sendmai sendmail: accepting
> connections
> Is     25   535     1  1132   976  0.0 sendmai sendmail: Queue
> runner@00:30:00 for /var/spool/clientmqueue (sendmail)
> bash-3.2# /usr/pkg/libexec/nagios/check_procs -vv -C "sendmai"
> CMD: /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args'
> PROCS OK: 2 processes with command name 'sendmai'
>
> So something strange with the ps command...
>

That ps command works on my NetBSD 5.  Does it intentionally say
'sendmai' instead of 'sendmail' ?


Home | Main Index | Thread Index | Old Index