[rrd-users] C API for rrdtool

Petteri Matilainen pmatil at gmail.com
Wed Nov 27 20:43:15 CET 2013


On 27.11.2013 13:12, Fizza Hussain wrote:
> Hi,
>
> I want to create and update the RRD database from a C code. For that
> purpose, I have included rrd.h file in my source code and have linked
> the C code against librrd library. These two steps are done perfectly.
> However, I am facing some difficulties in figuring out what arguments
> should I provide to the functions provided by C API? For example,
> rrd_create( ) function takes an int and a char string as its arguments.
> i.e. {int rrd_create(int , char **)}.
>
>
> I have previously used rrdtool via CLI and am comfortable with its CLI
> commands rrdtool create test.rrd --start 90234 (and so on). Please guide
> me what should be the arguments to the rrd_create( ) function provided
> by C API.
>
>
>
> Thanks,
>
> Fizza Hussain
>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>

Hi Fizza,

The create function takes only 2 arguments: the count and the array of 
pointers to the arguments. Among the first links in google I found this 
example: http://permalink.gmane.org/gmane.comp.db.rrdtool.devel/894 
There's an example on how to use the create function and many others. 
Note that the examples are for an older version of rrdtool so you may 
have to modify the code.

regards,

Pete




More information about the rrd-users mailing list