ePN and memory leaks

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Tue Dec 31 04:30:52 CET 2002


Dear Sir,

I am writing to thank you for your letter and say,

On Mon, Dec 30, 2002 at 08:15:54PM -0500, atonns at mail.ivillage.com wrote:
> I'm using two instances of embedded perl nagios (ie: --enable-embedded-perl
> --with-perlcache) v1.0b6 on Solaris 7 to monitor the production and
> development networks. They both use MySQL for all data (ie:
> --with-mysql-xdata)
> 
> The production network has 34 hosts and 429 services.
> The development network has 28 hosts and 211 services.
> 
> On both networks I've seen the nagios process creep from using 6MB of RAM to
> over 64MB of RAM over about a week's time. 

that the mmemory leaks/increase goes with the territory I am afraid.

"You should also be conscious that embedding Perl into an application
will increase its size and memory usage, possibly introducing memory
leaks or instabilities if you aren't careful .."

Couzins and Jennings, 'Extending and Embedding Perl'.

That said, I have been using ePN sans DB support for over a year monitoring ~ 190 hosts
and ~ 350 services without too many hassles.

My memory usage is about the same as yours,

 1514 nagios          10   0 57056K 29928K nanslp 152:44  0.00%  0.00%
nagios

However, I do like to restart Nagios each month after log rotation.

I am starting to take an unhealthy interest in XS so it's possible that
books like those above will shed some new light on the Perl embedding in
Nagios.


> The custom perl scripts that
> perform service checks using Net::SNMP and SNMPv3 work well

Neat. 

<off_topic>
Have you any SNMPv3 agents embedded in Network hardware ? 
</off_topic>

> - they pass 'use
> strict' without problems and run sucessfully from mini_epn. One minor
> problem with mini_epn is that because my code properly calls
> alarm($TIMEOUT), mini_epn never hangs around very long.
> 
> Are there any suggestions for finding memory leaks in ePN? (I'm going to be
> looking at Apache::Leak and Devel::Leak, but there might be other debug
> options in nagios I'm not aware of).
>

Not that I am aware of. It sounds like you are on the right track
though.

Apart from Stas Beckmans stuff on Perl.COM (mod_perl tuning that is
potentially helpful).

You could also run any suggestions past the ePN author (noted in the
source).
 
> Thanks in advance...

Yours sincerely.

-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list