[Nagiosplug-devel] RE: [Nagios-users] checking memory and cpu consumption of procs

Voon, Ton Ton.Voon at egg.com
Mon Jan 6 09:41:05 CET 2003


Karl,

I've been working with Dave on the check_cpu plugin and have finally got it
integrated.

As you requested, we have split it into two sets of patches:
- configure/makefile changes to be incorporated into v1.3
- check_cpu.c to be added for v1.4

I propose that check_cpu.c is added to the contrib directory for 1.3 with a
readme to say that to compile it, it needs to be copied into the plugins
directory and configure to be rerun. At the moment, the CPU_COMMAND variable
is only configured for Solaris and FreeBSD - any patches for other OSes are
warmly welcomed!

I've tested the patches against the 200301061100-snapshot on Solaris.

Ton
 
 <<acconfig.h.patch>>  <<plugins/common.h.in.patch>>  <<configure.in.patch>>
 <<plugins/Makefile.am.patch>>  <<check_cpu.c>> 
> -----Original Message-----
> From:	Karl DeBisschop [SMTP:karl at debisschop.net]
> Sent:	Sunday, December 22, 2002 1:51 PM
> To:	Voon, Ton
> Cc:	'Dave Viner'; Nagiosplug-devel
> Subject:	Re: [Nagiosplug-devel] RE: [Nagios-users] checking memory
> and cpu consumption of procs
> 
> On Fri, 2002-12-20 at 12:49, Voon, Ton wrote:
> > Copying onto nagiosplug-devel list. Future replies will only be to the
> > nagiosplug-devel list.
> > 
> > I would go with "Keep it simple". If a plugin reports a failure, then it
> is
> > the manual investigation that will show up the stderr failures. I would
> > think a ps failure is fairly catastrophic ;o)
> > 
> > Then again, maybe it is just the initial pain of a new model. I can see
> the
> > model makes more sense for plugins that call 3rd party commands. Maybe
> Karl
> > would be interested in adding runcmd in utils.c?
> 
> I would be willing to add/replace the spopen model with polling. I sort
> of tried to get part way there by scanning stderr, way back when I first
> implemented spopen. I didn't really think about blocking at the time, I
> just figured a 3rd party util that used stderr needed to at least note
> that, usually by throwing a warning. 
> 
> I will look at transition/implementation issues later. I think this
> souns like a 1.4 issue, however.
> 
> > If your friends are going to look at this on Solaris, here's some of the
> > pain I discovered:
> 
> Thanks. I think most of this can go right into 1.3. Except I am hesitant
> to add a new plugin at this point, so maybe check_cpu itself can get
> added just after 1.3 is released.
> > 
> > strsep is not supported on Solaris. A portable version is:
> >
> /*************************************************************************
> **
> 
> <cut>
> 
> Sound reasonable?
> 
> -- 
> Karl DeBisschop <karl at debisschop.net>


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: acconfig.h.patch
Type: application/octet-stream
Size: 290 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20030106/b0349b07/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: common.h.in.patch
Type: application/octet-stream
Size: 403 bytes
Desc: plugins/common.h.in.patch
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20030106/b0349b07/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.in.patch
Type: application/octet-stream
Size: 2383 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20030106/b0349b07/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.am.patch
Type: application/octet-stream
Size: 1369 bytes
Desc: plugins/Makefile.am.patch
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20030106/b0349b07/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_cpu.c
Type: application/octet-stream
Size: 11695 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20030106/b0349b07/attachment-0004.obj>


More information about the Devel mailing list