[rrd-users] Re: Multi threaded Perl scripts using RRDTool

Anders Nygren anders.nygren at gmail.com
Wed Sep 6 17:19:55 MEST 2006


On 9/6/06, Alex van den Bogaerdt <alex at ergens.op.het.net> wrote:
> On Wed, Sep 06, 2006 at 02:51:07PM +0100, Richard Burton wrote:
>
> > I have read past posts on the problems people have been having with
> > writing multi threaded Perl scripts with RRDTool.
> >
> > I am trying to write one which uses rrdupdate and rrdcreate via the perl
> > bindings and the script crashes.
> >
> > Would it be true to say that there is not way at present I am going to
> > get this working? Alternatively does anyone have any ideas as to what I
> > can do short of rewriting the whole thing in C.
>
>
> Try one of these:
>
> 1: some kind of internal locking.  Only one thread at a time may call
> rrdtool (update, create, or whatever other sub program).
>
> 2: have one thread communicating with rrdtool.  Other threads communicate
> with this single thread to get something done.
>

Now I am confused.

On Aug 29 there was a thread "RRD Locking Mechanism "
http://lists.ee.ethz.ch/rrd-users/msg11620.html

Where Tobias wrote

On 8/29/06, Tobias Oetiker <tobi at oetiker.ch> wrote:
> Hi Jason,
>
> > graph at the same time an RRD is being updated? Does RRDTool have an
> > explicit locking mechanism or does it depend on the file system to
> > handle that?
>
> rrdtool uses filesystem locking systemcalls ... to prevent rrdtools
> from trippiong over each other.
>

Unfortunately I sent my question only to Tobias

> Just to make sure that I understand. Does that mean there is NO
> risks involved when 2, or more, processes tries to access the
> same rrd file at the same time?
> I will not get any errors because the file is locked by another
> process, or anything like that?

To which Tobias answered me

> yes rrdtool does it's own locking, no need for you to worry ...

Or is this thread specifically about a perl library problem??

/Anders

--
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