[rrd-users] Re: Memory leak in RRDs::graph?

Darryl Lewis Lewis.Darryl at abc.net.au
Thu Oct 26 02:23:00 MEST 2006


I run my data capture and graphing programs using cron, rather a continously running script.
That way the OS takes care of the garbage collection.

-----Original Message-----
From: rrd-users-bounce at list.ee.ethz.ch
[mailto:rrd-users-bounce at list.ee.ethz.ch]On Behalf Of Ben Griffith
Sent: Thursday, 26 October 2006 4:55 AM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Memory leak in RRDs::graph?


Hello,
I'm using RRD with MisterHouse home automation software to keep track of
temperatures from several sensors around my house.  I have a perl script
that calls RRDs::graph once for each of six sensors and also generates the
html to display them in a simple web page.  The perl script is served by the
web server that is internal to MH.  Every time the web page is refreshed
(and the perl script is run again) the memory usage reported by MH increases
by 0.3 MB.  I keep that page open in a browser most of the time and after a
few days of being automatically refreshed every 2 minutes the memory usage
gets high enough to cause the disk to thrash with accesses to swap, and the
machine slows to a crawl.  If I comment out the call to RRDs::graph so that
new graphs are not created when the page is refreshed there is no increase
in memory usage shown by MH.

The next thing I did was to pull out the RRDs::graph line and put it into
its own file, which I then call from the original script using a system
call.  Again, no increase in memory usage shown by MH.

I have attached the original "leaky" file, rrd_graph_web.pl.  It won't work
by itself however because it depends on some variables that are in other
parts of MH.  The other file, rrd_create_graph.pl, is what I pulled out of
the first file.  That one will run on its own if given enough arguments,
like this:
perl ./rrd_create_graph.pl MBR_Temperature
../../data/rrd/MBR_Temperature.rrd ../graphics 1_Day Sensor 120 500

I'm pretty new to perl, so I don't know where to go from there.  I can send
along one of my RRD files, but I don't think it's dependent on that.

Thanks,
Ben



-- Attached file removed by Ecartis and put at URL below --
-- Type: application/x-perl
-- Size: 4k (4791 bytes)
-- URL : http://lists.ee.ethz.ch/p/rrd_graph_web.pl


-- Attached file removed by Ecartis and put at URL below --
-- Type: application/x-perl
-- Size: 937 bytes
-- URL : http://lists.ee.ethz.ch/p/rrd_create_graph.pl


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi


==============================================================================
The information contained in this email and any attachment is confidential and
may contain legally privileged or copyright material.   It is intended only for
the use of the addressee(s).  If you are not the intended recipient of this
email, you are not permitted to disseminate, distribute or copy this email or
any attachments.  If you have received this message in error, please notify the
sender immediately and delete this email from your system.  The ABC does not
represent or warrant that this transmission is secure or virus free.   Before
opening any attachment you should check for viruses.  The ABC's liability is
limited to resupplying any email and attachments
==============================================================================

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list