[Nagiosplug-devel] Troubles with Check_mem.pl

Thomas Guyot-Sionnest Thomas at zango.com
Wed Sep 13 21:06:03 CEST 2006


It's a good idea to submit a new patch so other users may use it... The best
thing to do is file a bug report on
http://sourceforge.net/projects/nagiosplug/ and then upload your patch in
the bug report as a suggestion to fix the problem.

BTW I just tested and I see what's wrong. On my system it uses the buff
column instead of the free column, and uses the free column as used (my
vmstat doesn't provide a used collumn, it looks like the guy who wrote this
script has a different vmstat).

Also, it should be allowed to substract buffers and cache from the memory
count. On systems with very constant memory usage you may end up having no
free memory but a lot of cached memory that can be used right away if an
application needs it. Ex, on a one server I have 99.8% ram used, but I have
5.7G (Yeah, this is Gigs) of cached memory. If I substract buffers and cache
I go down to 81%

A system low on memory will have almost no buffers and cache. Buffers and
cache are used to speed-up the system when memory is available.

Thomas

> -----Original Message-----
> From: lewis at wsc.com [mailto:lewis at wsc.com] 
> Sent: September 13, 2006 11:38
> To: Thomas Guyot-Sionnest
> Subject: RE: [Nagiosplug-devel] Troubles with Check_mem.pl
> 
> [Responding off-list, because I'm not sure of the appropriate 
> etiquette;
> I don't wish to pester *everyone* with this conversation.]
> 
> Oooooh.  Yes, that is a  better idea, thanks.  May I make that change
> and then resubmit the patch, or should I just make the change 
> in my own
> stuff and assume no one else cares?
> 
> It isn't so much easier to parse... (the computer does almost all that
> work), but it is much faster.
> 
> Thanks again.
> 
> Be well,
> 
> Karl
> 
> -----Original Message-----
> From: nagiosplug-devel-bounces at lists.sourceforge.net
> [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On Behalf Of
> Thomas Guyot-Sionnest
> Sent: Wednesday, September 13, 2006 11:01 AM
> To: Nagios Plugin Development Mailing List
> Subject: Re: [Nagiosplug-devel] Troubles with Check_mem.pl
> 
> free is likely the command you'll want to use. Invoked as "free -k" it
> will
> report the same numbers as top (You can also get them in -b(ytes)
> -m(egs)
> and -g(igs)), but should run much faster and be easier to parse.
> 
> Thomas
> 
> > -----Original Message-----
> > From: nagiosplug-devel-bounces at lists.sourceforge.net 
> > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On 
> > Behalf Of lewis at wsc.com
> > Sent: September 13, 2006 10:51
> > To: nagiosplug-devel at lists.sourceforge.net
> > Subject: [Nagiosplug-devel] Troubles with Check_mem.pl
> > 
> > On Red Hat AS 3 systems, with perl 5.8.0 the check_mem.pl 
> > script is an unreliable indicator of the remaining memory.  
> > I've had cases where it reports a problem where none exists, 
> > or fails to report a problem where memory is critically low.  
> > 
> >  
> > 
> > I'm not an experienced perl programmer, but I swapped in some 
> > code to use top, instead of vmstat, and then to deal with the 
> > output from that operation.  I think it works better.
> > 
> >  
> > 
> > A patch file is attached.  The original work is GPL'ed so 
> > these derivative modifications are as well, if anyone cares 
> > to use this change.
> > 
> >  
> > 
> > I'd be happy to hear why this change *won't* work, by the way.   
> > 
> >  
> > 
> > Be well,
> > 
> >  
> > 
> > Karl
> > 
> >  
> > 
> > Karl W. Lewis
> > 
> > Wall Street Concepts
> > 
> > 44 Wall Street
> > 
> > New York, NY 10005
> > 
> > (646) 443-8791
> > 
> > (212) 797-9897 FAX
> > 
> >  
> > 
> > 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3022 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20060913/f5a5222a/attachment.bin>


More information about the Devel mailing list