<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Nagios-users] ePN and memory leaks</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Has anyone else done an in-depth investigation of memory leaks in ePN and/or custom checks written for ePN?</FONT>
</P>

<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: Stanley Hopcroft [<A HREF="mailto:Stanley.Hopcroft@IPAustralia.Gov.AU">mailto:Stanley.Hopcroft@IPAustralia.Gov.AU</A>]</FONT>
<BR><FONT SIZE=2>> Sent: Monday, December 30, 2002 10:31 PM</FONT>
<BR><FONT SIZE=2>> To: atonns@mail.ivillage.com</FONT>
<BR><FONT SIZE=2>> Cc: nagios-users@lists.sourceforge.net</FONT>
<BR><FONT SIZE=2>> Subject: Re: [Nagios-users] ePN and memory leaks</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> > Are there any suggestions for finding memory leaks in ePN? </FONT>
<BR><FONT SIZE=2>> (I'm going to be</FONT>
<BR><FONT SIZE=2>> > looking at Apache::Leak and Devel::Leak, but there might be </FONT>
<BR><FONT SIZE=2>> other debug</FONT>
<BR><FONT SIZE=2>> > options in nagios I'm not aware of).</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Not that I am aware of. It sounds like you are on the right track</FONT>
<BR><FONT SIZE=2>> though.</FONT>
</P>

<P><FONT SIZE=2>Well, I've run several tests with both Apache::Leak and Devel::Leak and have found that it's not my code that's leaking, but either p1.pl or mini_epn. The number of SVs before and after executing my code stays the same (or decreases!). BUT the number of SVs between invocations when called by mini_epn increases. Below is an example where I use Devel::Leak and have changed the output of my service check to be the ENTER and LEAVE values returned by NoteSV and CheckSV (note that the first invocation increases dramatically because of DynaLoaded modules)</FONT></P>

<P><FONT SIZE=2>$ ./mini_epn 2>/dev/null</FONT>
<BR><FONT SIZE=2>Enter file name: check_remote_interfaces-leak_test</FONT>
<BR><FONT SIZE=2>embedded perl plugin output was -12820724,ENTER: 32488 LEAVE:32674</FONT>
</P>

<P><FONT SIZE=2>Enter file name: check_remote_interfaces-leak_test</FONT>
<BR><FONT SIZE=2>embedded perl plugin output was -12820724,ENTER: 32686 LEAVE:32686</FONT>
</P>

<P><FONT SIZE=2>Enter file name: check_remote_interfaces-leak_test</FONT>
<BR><FONT SIZE=2>embedded perl plugin output was -12820724,ENTER: 32694 LEAVE:32693</FONT>
</P>

<P><FONT SIZE=2>Enter file name: check_remote_interfaces-leak_test</FONT>
<BR><FONT SIZE=2>embedded perl plugin output was -12820724,ENTER: 32701 LEAVE:32700</FONT>
</P>

<P><FONT SIZE=2>Enter file name: check_remote_interfaces-leak_test</FONT>
<BR><FONT SIZE=2>embedded perl plugin output was -12820724,ENTER: 32708 LEAVE:32707</FONT>
</P>

<P><FONT SIZE=2>> You could also run any suggestions past the ePN author (noted in the</FONT>
<BR><FONT SIZE=2>> source).</FONT>
</P>

<P><FONT SIZE=2>I couldn't find this person's info (is it not Ethan Galstad?).</FONT>
<BR><FONT SIZE=2>I don't want to bother who are no longer involved in the project.</FONT>
</P>

<P><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2>"Computer science is as much about computers as</FONT>
<BR><FONT SIZE=2>        astronomy is about telescopes" -- Edsger Dijkstra</FONT>
<BR><FONT SIZE=2>---------------------------------------------------------</FONT>
<BR><FONT SIZE=2>Anthony Tonns, UNIX Administrator - atonns@mail.ivillage.com</FONT>
</P>

</BODY>
</HTML>