[rrd-users] RRA AVERAGE:0.5:1 undesirable result
Tobias Oetiker
tobi at oetiker.ch
Tue Oct 13 08:04:07 CEST 2009
Hi All,
Yesterday Marc Powell wrote:
>
> On Oct 12, 2009, at 4:48 PM, kssgill wrote:
>
> >
> > Hi, I've setup a test RRA as shown below and create a perl script
> > to popuate
> > it with test data. I'm see rounding off of data which is not what I
> > was
> > expecting.
> >
> > This is how I created an rrd file:
> >
> > rrdtool create testfile.rrd -s 20 DS:await:GAUGE:40:0:10000000
> > RRA:AVERAGE:0.5:1:1598400
>
> I'm not an rrdtool expert but... You don't specify a start time so
> you're telling rrdtool to expect updates at exactly 20 second
> intervals from [the time this file is created -10 seconds]...
>
> > my $rrdUpd = `rrdupdate testfile.rrd -t await N:$i`; chomp($rrdUpd);
>
> This uses the current timestamp (N), which may or may not be exactly a
> 20 second interval from the above start time...
note that the creation/start time of the rrd does not matter so
much ... since all 'buckets' are aligned to 1970 Jan 1st 0:00 UTC.
> > And I'm surprised to see that instead of see 2,4,6,8. The numbers are
> > 2,3.7,5.7,7.7
> >
> > 2.0000000000e+00
> > 3.7085260000e+00
> > 5.7077767000e+00
> > 7.7067147000e+00
> >
> > Not able to understand how I lost percision on the number. From
> > reading
> > online Average:0.5:1 should be the number it self.
>
> Only if you input data on the exact timestamps that correspond to the
> buckets (steps from start) you've created in the RRD. In your case,
> your insert timestamp is a little bit off from the bucket and RRDtool
> is adjusting the value to fit in the bucket based on its rate (all
> values to rrdtool are rates).
if you want to to see the same data you entered in the buckt, you
have to drop the data on the right (future) rim of the bucket ...
cheers
tobi
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-users
mailing list