I have an application where I will be doing updates to several RRD databases
on about a 5-10 second interval.  In this application, I think it would be
desirable to be able to hold open the filehandles on the databases and
perform updates without the overhead of re-opening and re-closing the
files, etc.  Is there any code already existing that would allow
something along the lines of:

FH=RRDs::open("foo.rrd");
$c=1;
while($c)
{
        sleep(10);
        ($c, $when, $foo, $bar, $blat, $flop)=acquirefunction();
        $i=RRDs::updatefh(FH, "--template=foo:bar:blat:flop",
                        join(":", $when, $foo, $bar, $blat, $flop));
}

RRDs::close(FH);
exit(0);



Or is this impractical/impossible given the nature of RRD?

Obviously, this code snipet is an oversimplified example of what I am
planning to do, but it seems to me that the overhead of opening and closing
the database everytime and rereading all the state information necessary
might be a desireable thing to eliminate if possible.

Flames, etc welcome, please send to me, if it's interesting to enough people,
I'll summarize to the list.

Owen

--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to