[Pkg-nagios-devel] nagios2 packaging progress

Marc Haber mh+pkg-nagios-devel at zugschlus.de
Fri Jan 20 15:58:21 UTC 2006


On Sat, Jan 14, 2006 at 08:32:32PM -0500, sean finney wrote:
>     * remove -s parameter from check_local_procs in checkcommands.cfg
>     since it doesn't behave as advertised anyway
> 
> i'll have to look more into that before commenting.

$ /usr/lib/nagios/plugins/check_procs -w 150 -c 250 -s RSZDT; ps aux | awk '{if( $8 == "S" ) { print $2 }}' | wc -l
PROCS OK: 28 processes with STATE = RSZDT
28

This looks to me that STATE=RSZDT only counts processes with state
"S", ignoring, for example, processes with state S+.

$ /usr/lib/nagios/plugins/check_procs -w 150 -c 250 -s SN; ps aux | awk '{if( $8 == "SN" ) { print $2 }}' | wc -l
PROCS OK: 42 processes with STATE = SN
12

_This_ looks to me that STATE=SN counts significantly more processes
than only those with state SN. And the only docs available
(check_procs --help) don't fit either observed behavior: "Only scan
for processes that have, in the output of ps, one or more of the
status flags you specify (for example R, Z, S, RS, RSZDT, plus others
based on the output of your 'ps' command)."

Additionally, the sample configurations include two different,
mutually incompatible definitions of check_local_procs (one having
two, the other having three parameters).

Therefore I'd say it is safer to generally go for the two-parameter
version of the definition as there are no ambiguities with the docs in
that version.

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835



More information about the Pkg-nagios-devel mailing list