<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Fizza Hussain</b> <span dir="ltr">&lt;<a href="mailto:12mseefhussain@seecs.edu.pk">12mseefhussain@seecs.edu.pk</a>&gt;</span><br>
Date: Wed, Nov 27, 2013 at 11:41 PM<br>Subject: Re: [rrd-users] C API for rrdtool<br>To: Chris Malton &lt;<a href="mailto:chrism@cmalton.me.uk">chrism@cmalton.me.uk</a>&gt;<br><br><br><div dir="ltr"><div><div><div><div>Chris, Thank you so much for your reply.<br>
<br></div>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 <span style="font-family:comic sans ms,sans-serif">rrdtool create</span> option: <span style="font-family:comic sans ms,sans-serif"><br>

rrd_create(&#39;Flow1bytes.rrd&#39;,&#39;--start 920804400&#39;, &#39;DS:speed:COUNTER:600:U:U&#39; &#39;RRA:AVERAGE:0.5:1:24&#39;);</span><br><br> However, I get the following error:<br><span style="font-family:courier new,monospace">error: too many arguments to function ‘rrd_create’</span><br>

</div><br></div>Can you please tell me what is the equivalent correct way to do pass arguments to the function rrd_create( ) function?<br><br></div><div>I am really grateful for your help.<br></div></div><div class="HOEnZb">
<div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Nov 27, 2013 at 4:45 PM, Chris Malton <span dir="ltr">&lt;<a href="mailto:chrism@cmalton.me.uk" target="_blank">chrism@cmalton.me.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Fizza,<div><br>
<br>
On Wed, 27 Nov 2013 16:12:18 +0500, Fizza Hussain wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For example,<br>
rrd_create( ) function takes an int and a char string as its<br>
arguments. i.e. {int rrd_create(int , char **)}.<br>
</blockquote>
<br></div>
The full function signature is: int rrd_create(int argc, char **argv)<br>
<br>
argc = Count of arguments<br>
argv = Array of char* arguments<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have previously used rrdtool via CLI and am comfortable with its CLI<br>
commands rrdtool create test.rrd --start 90234 (and so on). Please<br>
guide me what should be the arguments to the rrd_create( ) function<br>
provided by C API.<br>
</blockquote>
<br></div>
Simply pass the command line as you would to rrdtool, to the rrd_X functions (if I remember rightly, you need to pass the &quot;create&quot;, &quot;update&quot; etc as well).<br>
<br>
Hope that helps.<br>
<br>
Regards,<br>
<br>
Chris<br>
</blockquote></div><br></div>
</div></div></div><br></div>