[Nagiosplug-devel] check_procs v 1.46 BASENAME and ignore self
lars.bruun-hansen at nordea.com
lars.bruun-hansen at nordea.com
Fri Feb 24 08:11:17 CET 2006
I've previously succesfully used v1.43 but now I seem to be facing major
problems with 1.46.
I'm on Solaris 10 and these are my findings:
Issue #1
The HAVE_BASENAME change is not good for me because this piece of code
is not compiled since HAVE_BASENAME is undefined. Where is it supposed
to come from ?
(Solaris does indeed have a basename() function and it will work as
expected)
The result of this is that -C filter does not work as expected.
Issue #2
The code changes made in order to ignore self does not seem to work.
I can see this by running in verbose mode (-vvv) and checking when the
procs
counter is increased. To me the problem seems to be that there are
actually
two proceses that you would want to ignore.
1. the check_procs process
2. the ps process (which will be a child of the one above)
Not really knowing the code I think that you will have to check on both
the actual PID and as well as the PPID, i.e.
if (mypid == procpid || mypid == procppid) continue;
The result of this issue is that check_procs will report one more
process
than what actually exist.
Issue #3
There is something strange - unless it is intentional - with my
PS_VARLIST. I note that
variable procpid is repeated. Is this really intentional?
This is how it looks in config.h:
/* Variable list for sscanf of 'ps' output */
#define PS_VARLIST
procstat,&procuid,&procpid,&procpid,&procvsz,&procrss,&procpcpu,procprog
,&pos
I would have thought that it should have been:
#define PS_VARLIST
procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procpro
g,&pos
rgds,
Lars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20060224/28f00627/attachment.html>
More information about the Devel
mailing list