[Nagiosplug-devel] check_procs problem
James Fidell
james at cloud9.co.uk
Wed Jan 8 04:16:05 CET 2003
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
More information about the Devel
mailing list