[rrd-users] Fwd: C API for rrdtool

Fizza Hussain 12mseefhussain at seecs.edu.pk
Wed Nov 27 19:42:45 CET 2013


---------- Forwarded message ----------
From: Fizza Hussain <12mseefhussain at seecs.edu.pk>
Date: Wed, Nov 27, 2013 at 11:41 PM
Subject: Re: [rrd-users] C API for rrdtool
To: Chris Malton <chrism at cmalton.me.uk>


Chris, Thank you so much for your reply.

I am passing the arguments to rrd_create( ) the same commands that I use in
rrdtool (CLI). I am writing it this way, following exactly the way I
use rrdtool
create option:
rrd_create('Flow1bytes.rrd','--start 920804400', 'DS:speed:COUNTER:600:U:U'
'RRA:AVERAGE:0.5:1:24');

However, I get the following error:
error: too many arguments to function ‘rrd_create’

Can you please tell me what is the equivalent correct way to do pass
arguments to the function rrd_create( ) function?

I am really grateful for your help.


On Wed, Nov 27, 2013 at 4:45 PM, Chris Malton <chrism at cmalton.me.uk> wrote:

> Hi Fizza,
>
>
> On Wed, 27 Nov 2013 16:12:18 +0500, Fizza Hussain wrote:
>
>> For example,
>> rrd_create( ) function takes an int and a char string as its
>> arguments. i.e. {int rrd_create(int , char **)}.
>>
>
> The full function signature is: int rrd_create(int argc, char **argv)
>
> argc = Count of arguments
> argv = Array of char* arguments
>
>
>  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.
>>
>
> Simply pass the command line as you would to rrdtool, to the rrd_X
> functions (if I remember rightly, you need to pass the "create", "update"
> etc as well).
>
> Hope that helps.
>
> Regards,
>
> Chris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20131127/f14e4d67/attachment.htm 


More information about the rrd-users mailing list