[Nagiosplug-devel] [ nagiosplug-Bugs-1118832 ] check_procs reports incorrect number of processes
SourceForge.net
noreply at sourceforge.net
Tue Feb 8 11:01:52 CET 2005
Bugs item #1118832, was opened at 2005-02-08 11:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1118832&group_id=29880
Category: Argument proccessing
Group: snapshot tarball
Status: Open
Resolution: None
Priority: 5
Submitted By: Chris (clambertus)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_procs reports incorrect number of processes
Initial Comment:
When check_procs is used with a system like check_nrpe,
the nrpe daemon executes popen(), which causes
check_procs to be executed as "sh -c
/path/to/check_procs argument_list"
This causes erroneous returns because check_procs fails
the strcmp(procprog,progname) call, since the
"procprog" is actually sh.
To fix this, I added an additional strstr() call which
compares progname against procargs and discards the
line if "check_procs" appears in the process argument list.
This is not an ideal solution, but should take care of
the vast majority of cases where check_procs is used
with check_nrpe or similar utilities.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1118832&group_id=29880
More information about the Devel
mailing list