Re: Status flags supported by check_procs

Mauro <[email protected]>
Newsgroups gmane.network.nagios.plugins.devel
Message-ID <CAJAUd+H7ZaFO7kf=2aDNA07NMhrZNLU5qwJaUz5oWNvxq-=i8A@mail.gmail.com>
Hello,

I thought to have mentioned it, but I'll clarify now.
Note that I asked for a command line option, not a compile one, but I
understand this could not be feasible.

> I'm running nagios plugins 1.4.15, nagios 3.2.2, installed from rpm on a
 redhat based distribution.

Distribution is quite old, but I cannot upgrade it. I can try to re-compile
nagios plugins with the last source and see how it goes though.

 ~ > rpm -qi nagios-plugins-procs
Name        : nagios-plugins-procs         Relocations: (not relocatable)
Version     : 1.4.15                            Vendor: Amazon.com
Release     : 2.1.amzn1                     Build Date: Fri 29 Oct 2010
01:12:18 AM BST
Install Date: Tue 19 Mar 2013 08:56:31 AM GMT      Build Host:
build-31002.build
Group       : Applications/System           Source RPM:
nagios-plugins-1.4.15-2.1.amzn1.src.rpm
Size        : 118688                           License: GPLv2+
Signature   : RSA/8, Wed 03 Nov 2010 06:46:25 PM GMT, Key ID
bcb4a85b21c0f39f
Packager    : Amazon.com, Inc. <http://aws.amazon.com>
URL         : http://nagiosplug.sourceforge.net/
Summary     : Nagios Plugin - check_procs
Description :
Provides check_procs support for Nagios.

~ > uname -a
Linux content-build-1.build.uk 2.6.34.7-56.40.amzn1.x86_64 #1 SMP Fri Oct
22 18:48:49 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux



On 19 March 2013 11:44, Jochen Bern <[email protected]> wrote:

> 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+LV9MX5uipxlwaOVQ5f@public.gmane.org
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.