Re: Status flags supported by check_procs

Jochen Bern <Jochen.Bern-RMkW/[email protected]>
Newsgroups gmane.network.nagios.plugins.devel
Organization LINworks GmbH
Message-ID <[email protected]>
On 19.03.2013 12:20, Mauro wrote:
> My idea was to use the following command, by checking the "s" status flag
> from ps.
> 
> /usr/lib64/nagios/plugins/check_procs -C schedule_cron -sSs
> 
> This doesn't work, as check_procs doesn't seem to be checking the "s" flag.
> With the -vv option to check_procs, I can see that the ps command used is:
> 
> CMD: /bin/ps -eo '*s* uid pid ppid vsz rss pcpu etime comm args'
> 
> Instead of the "s" column, "stat" would do the job I need.
> 
> I wonder if it would be possible to change the default format from s to
> stat, or to not alter an existing behaviour, provide an option -o or
> similar for users customisations.

You didn't mention where you got your check_procs from. When installing
from sources, the "ps" command to use is usually determined
automatically during the "./configure", but things can also be
manipulated with the "--with-ps-..." options; see the output of
"./configure --help".

Note that incompatibilities between "ps" outputs are a common occurence
when using check_procs (try matching a string waaaay into a long command
line ...), and compiling a check_procs version with a "ps" command to
match *one* specific need isn't going to help much with that, to say the
least.

Regards,
								J. Bern
-- 
*NEU* - NEC IT-Infrastruktur-Produkte im <http://www.linworks-shop.de/>:
Server--Storage--Virtualisierung--Management SW--Passion for Performance
Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5upmplPMkL2fr@public.gmane.orget
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.