Hi there,<div><br><br><div class="gmail_quote">On Tue, Jan 17, 2012 at 1:25 PM, Simon Hobson <span dir="ltr"><<a href="mailto:linux@thehobsons.co.uk">linux@thehobsons.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">Adriano Monteiro Marques wrote:<br>
<br>
>I've being trying for a couple of days to create an RRD and store<br>
>some data in it. I read the documentation, and followed examples,<br>
>but couldn't manage to get it working. It could be either a bug or a<br>
>non-obvious error in my code. Here is how to reproduce:<br>
><br>
>$ rrdtool create filename.rrd \<br>
> > --step '1' \<br>
> > 'DS:reads:GAUGE:10:0:U' \<br>
> > 'DS:writes:GAUGE:10:0:U' \<br>
> > 'RRA:AVERAGE:0.5:300:100' \<br>
> > 'RRA:AVERAGE:0.5:300:1000' \<br>
> > 'RRA:AVERAGE:0.5:300:500'<br>
>$ rrdtool update filename.rrd N:1:1<br>
>$ rrdtool update filename.rrd N:1:2<br>
>$ rrdtool update filename.rrd N:3:2<br>
>$ rrdtool update filename.rrd N:3:5<br>
>$ rrdtool update filename.rrd N:6:5<br>
>$ rrdtool update filename.rrd N:6:8<br>
>$ rrdtool update filename.rrd N:6:9<br>
>$ rrdtool update filename.rrd N:6:10<br>
>$ rrdtool update filename.rrd N:6:11<br>
>$ rrdtool update filename.rrd N:6:12<br>
>$ rrdtool fetch filename.rrd AVERAGE<br>
> reads writes<br>
><br>
><a href="tel:1326722400" value="+551326722400">1326722400</a>: nan nan<br>
><a href="tel:1326722700" value="+551326722700">1326722700</a>: nan nan<br>
><a href="tel:1326723000" value="+551326723000">1326723000</a>: nan nan<br>
><a href="tel:1326723300" value="+551326723300">1326723300</a>: nan nan<br>
>...<br>
><br>
>It continues like this showing only nan for dozens of lines and I<br>
>don't get any useful content out of it. What am I missing?<br>
<br>
</div></div>Have you really read the docs ?<br>
<br>
You've defined an RRD with a step of 1 - that means 1 second per PDP.<br>
You've set the heartbeat to 10 in your DSs, so if more than 10<br>
seconds between updates the value becomes unknown. Given the<br>
timescales in the output, it looks like you are updating at somewhat<br>
more than 10 second gaps, therefore your data is always unknown.<br></blockquote><div><br></div><div>I ran each update command 1 second or so apart, so it shouldn't be missing the data because of that. Did you try the example I mentioned?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Next, you've defined three RAAs, all with consolidation function of<br>
AVERAGE, all with 300 steps/row. Thus the RRA with 100 rows contains<br>
exactly the same data as the first 100 rows of the other two RRAs,<br>
and the RRA with 500 rows contains exactly the same data as the RRA<br>
with 1000 rows.<br></blockquote><div><br></div><div>The RRA shouldn't affect the way data is store anyways. The fact is that is isn't being stored.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
And of course, what you show us is **NOT** enough to reproduce the<br>
problem.</blockquote><div><br></div><div>It is enough. Just run the create command, and run the updates individually, 1 sec or apart from each other and you'll be able to reproduce.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You give no idea at all of timing - "N" tells us nothing<br>
about when the updates were run. If you are going to post examples,<br>
you need to include that data (ie use actual times rather than "N").<br></blockquote><div><br></div><div>Although N doesn't tell anything about it, it will use the current localtime. If you run the commands sequentialy, you'll be able to reliably reproduce without having to deal with cumbersome epoch numbers in the command line.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Try Alex's tutorials at <a href="http://www.vandenbogaerdt.nl/rrdtool/" target="_blank">http://www.vandenbogaerdt.nl/rrdtool/</a><br>
especially "Rates, normalizing and consolidating"<br></blockquote><div><br></div><div>Thanks for the tips! Do you see anything else I could be missing out?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">--<br>
Simon Hobson<br>
<br>
Visit <a href="http://www.magpiesnestpublishing.co.uk/" target="_blank">http://www.magpiesnestpublishing.co.uk/</a> for books by acclaimed<br>
author Gladys Hobson. Novels - poetry - short stories - ideal as<br>
Christmas stocking fillers. Some available as e-books.<br>
<br>
_______________________________________________<br>
rrd-users mailing list<br>
<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br>
</font></span></blockquote></div><br></div>