check_procs with -a argument

Frost, Mark {PBG} mark.frost1 at pepsi.com
Mon Feb 25 23:35:13 CET 2008


Thanks, Marc.

I'm doing this test on HPUX 11.23 (IA64).

I originally tested with check_procs 1.4.5, but to see if things would
change/improve, I tried with 1.4.11.

So interestingly, when I do 'check_procs -v -v -v' I see only

401 S      25791  1079  1062  0 158 20 e00000019523e280  111
e00000013c2de000 ?         0:00 ksh
proc#=174 uid=25791 vsz=0 rss=0 pid=1079 ppid=1062 pcpu=0.00 stat=S
etime= prog=ksh args=ksh
401 S      25791  2353  2209  0 158 20 e00000018bf5e4c0  111
e00000013cf3e000 ?         0:00 ksh
proc#=280 uid=25791 vsz=0 rss=0 pid=2353 ppid=2209 pcpu=0.00 stat=S
etime= prog=ksh args=ksh


For the 2 processes I'm trying to match.  So nothing like what I see
with 'ps'.  I'm guessing then that since it thinks the args for each
command is onlyi "ksh" I'm kind of screwed here.  I was hoping to not
have to whip up a quicky custom perl script to run 'ps' just for this.

Mark


>-----Original Message-----
>From: nagios-users-bounces at lists.sourceforge.net 
>[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf 
>Of Marc Powell
>Sent: Thursday, February 21, 2008 6:15 PM
>To: Nagios Users Mailinglist
>Subject: Re: [Nagios-users] check_procs with -a argument
>
>
>
>> -----Original Message-----
>> From: nagios-users-bounces at lists.sourceforge.net 
>[mailto:nagios-users-
>> bounces at lists.sourceforge.net] On Behalf Of Frost, Mark {PBG}
>> Sent: Thursday, February 21, 2008 4:48 PM
>> To: Nagios Users Mailinglist
>> Subject: [Nagios-users] check_procs with -a argument
>> 
>> 
>> I must admit I'm a little confused about using the 
>check_procs plugin.
>> The help shows that you can use the -a argument to match against args
>in
>> the command as follows:
>> 
>>  -a, --argument-array=STRING
>>    Only scan for processes with args that contain STRING.
>> 
>
>
>> check_procs -C ksh -a runnex.sh
>> check_procs -C ksh -a "runnex.sh"
>> check_procs -C ksh -a "OFH1"
>> check_procs -C ksh -a "/opt/zib/fit/asn_nex/OFH1/scripts/runnex.sh
>> /opt/java1.4/jre /opt/zib/fit/asn_nex/OFH1/bin/"
>> 
>> all I get in response is
>> 
>> PROCS OK: 0 processes with args 'runnex', command name 'ksh'
>> 
>> or variants of that.
>> 
>> What am I missing here?  Am I not listing all or part of arguments to
>> ksh?
>
>The -a is a substring search so I would expect it to be working. My
>guess is that your ps command isn't returning the args you think it is.
>Try running check_procs with '-v -v -v' to see the ps command that it's
>using and the output it is parsing from ps.
>
>Plugins version and how installed as well as OS version might 
>be useful.
>I suspect that you're not using a recent version as the output is
>transposed. You should try with the latest release if you're using an
>older version.
>
>--
>Marc
>
>---------------------------------------------------------------
>----------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>_______________________________________________
>Nagios-users mailing list
>Nagios-users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nagios-users
>::: Please include Nagios version, plugin version (-v) and OS 
>when reporting any issue. 
>::: Messages without supporting info will risk being sent to /dev/null
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list