[Nagiosplug-devel] check_procs problem

Voon, Ton Ton.Voon at egg.com
Wed Jan 8 06:54:03 CET 2003


I had a problem on Mac OS X (which is based on FreeBSD) where 

ps waxco 'state uid ppid command command'

would only give one command column. Patch 652074 which I've put on
sourceforge sets the command for MacOSX to be

ps waxo 'state uid ppid ucomm command'

instead. Maybe something similar is happening for you?

-----Original Message-----
From: James Fidell [mailto:james at cloud9.co.uk]
Sent: 08 January 2003 12:14
To: Subhendu Ghosh
Cc: nagiosplug-devel at lists.sourceforge.net
Subject: Re: [Nagiosplug-devel] check_procs problem


Quoting Subhendu Ghosh (sghosh at sghosh.org):

> Does the following work on FreeBSD? (one liner from configure.in)
> 
> ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i 
> "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID"

Did you mean egrep -v ?  If so, it only gives the command name, rather
than all the arguments, too (this is on FreeBSD 4.6).

It looks like the problem might be the "c" option to ps.  Removing it
gives me the entire command line.  Of course that's not really what we
want either, because it makes it non-trivial to match the -C parameter
to check_procs.

It looks like it may be necessary to run ps more than once to handle
the "check_procs -C cmd -a args"; once to match "cmd" and then again
once per process to match "args".  Perhaps this already happens.
Unfortunately the machine I have nagios installed on is having a fit
at the moment.  It's also 60 miles away and it's snowing, so I won't
be going there to fix it today.  I'll look into this a bit further once
I can get access to the machine again.

James


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Nagiosplug-devel mailing list
Nagiosplug-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.





More information about the Devel mailing list