[rrd-users] Can't store data to RRD file
Adriano Monteiro Marques
adriano at crowdspring.com
Tue Jan 17 16:49:37 CET 2012
Hi there,
On Tue, Jan 17, 2012 at 1:25 PM, Simon Hobson <linux at thehobsons.co.uk>wrote:
> Adriano Monteiro Marques wrote:
>
> >I've being trying for a couple of days to create an RRD and store
> >some data in it. I read the documentation, and followed examples,
> >but couldn't manage to get it working. It could be either a bug or a
> >non-obvious error in my code. Here is how to reproduce:
> >
> >$ rrdtool create filename.rrd \
> > > --step '1' \
> > > 'DS:reads:GAUGE:10:0:U' \
> > > 'DS:writes:GAUGE:10:0:U' \
> > > 'RRA:AVERAGE:0.5:300:100' \
> > > 'RRA:AVERAGE:0.5:300:1000' \
> > > 'RRA:AVERAGE:0.5:300:500'
> >$ rrdtool update filename.rrd N:1:1
> >$ rrdtool update filename.rrd N:1:2
> >$ rrdtool update filename.rrd N:3:2
> >$ rrdtool update filename.rrd N:3:5
> >$ rrdtool update filename.rrd N:6:5
> >$ rrdtool update filename.rrd N:6:8
> >$ rrdtool update filename.rrd N:6:9
> >$ rrdtool update filename.rrd N:6:10
> >$ rrdtool update filename.rrd N:6:11
> >$ rrdtool update filename.rrd N:6:12
> >$ rrdtool fetch filename.rrd AVERAGE
> > reads writes
> >
> >1326722400: nan nan
> >1326722700: nan nan
> >1326723000: nan nan
> >1326723300: nan nan
> >...
> >
> >It continues like this showing only nan for dozens of lines and I
> >don't get any useful content out of it. What am I missing?
>
> Have you really read the docs ?
>
> You've defined an RRD with a step of 1 - that means 1 second per PDP.
> You've set the heartbeat to 10 in your DSs, so if more than 10
> seconds between updates the value becomes unknown. Given the
> timescales in the output, it looks like you are updating at somewhat
> more than 10 second gaps, therefore your data is always unknown.
>
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?
> Next, you've defined three RAAs, all with consolidation function of
> AVERAGE, all with 300 steps/row. Thus the RRA with 100 rows contains
> exactly the same data as the first 100 rows of the other two RRAs,
> and the RRA with 500 rows contains exactly the same data as the RRA
> with 1000 rows.
>
The RRA shouldn't affect the way data is store anyways. The fact is that is
isn't being stored.
>
> And of course, what you show us is **NOT** enough to reproduce the
> problem.
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.
> You give no idea at all of timing - "N" tells us nothing
> about when the updates were run. If you are going to post examples,
> you need to include that data (ie use actual times rather than "N").
>
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.
>
> Try Alex's tutorials at http://www.vandenbogaerdt.nl/rrdtool/
> especially "Rates, normalizing and consolidating"
>
Thanks for the tips! Do you see anything else I could be missing out?
> --
> Simon Hobson
>
> Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
> author Gladys Hobson. Novels - poetry - short stories - ideal as
> Christmas stocking fillers. Some available as e-books.
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20120117/f1b7a576/attachment.htm
More information about the rrd-users
mailing list