[rrd-users] Re: C calls in rrdtool

Tobias Oetiker oetiker at ee.ethz.ch
Mon Sep 9 23:19:57 MEST 2002



Today tome anticic wrote:

>
>
> Hi,
>
> I probably have a rather naive question concerning rrdtool. I know it
> is possible to have rrdtool commands as system commands or as perl
> calls.
>
> But is it possible to have rrdtool commands from a C program?
> I am developing a C (actually C++) monitoring program, and each time an
> rrdtool call is made I use the  system("rrdtool update ...") calls.
>
> These system calls seem to me a waste of CPU, as I have to make hundreds
> of them every few seconds. Is it possble to link
> rrdtool libraries to have in my C program something like
> rrdtool_update(...) or rrdtool_fetch?
>
> Also, could there be any locking problems with different processes reading
> at the same time from the same rrd file, while one process writes to it?
>
> Any help would be greatly appreciated!

Sure you can call it from C ... look at rrd_cgi ...
make sure to reset error variables and getopt externals between
calls .. use rrd_cgi.c as sample
tobi
>
> 	Tome
>
>
>
>
>
>
>
>
> --
> 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://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, ETZ J97, ETH, 8092 Zurich, Switzerland
 / // _ \/ _ \/ / phoneto:+41(0)1-632-5286  faxto:+41(0)1-632-1517
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://google.com/search?q=tobi

--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list