[rrd-users] Error in database?
Karl Fischer
rrd-users at ficos.de
Thu Mar 5 10:57:13 CET 2009
Mats Gustafsson wrote:
> I created two databases which are identical but have different number of
> rows, i.e. it is only the number of rows in RRA:AVERAGE that differs. I
> then fed them with identical data at identical timestamps, but when I
> try to read their AVERAGE values I can only fetch data from one of them.
> I just don't understand this...
> ...
> rrdtool create ${STORAGE}/${RRDFILE} \
> --step 120\
> ...
> RRA:AVERAGE:0.5:5:2628000 \
Mats,
you have asked rrdtool to create a RRA that spans 120 x 5 x 2628000 seconds,
which equals to 50 years (!). The last datapoint in the RRA will be the one
of the last update (let's assume 'now' for now), that means, the first DP
is supposed be 50 years ago, so back in 1959 ...
rrdtool is using unix timestamps which started with 0 at 01.01.1970 0:00 UTC,
so you asked rrdtool to create a database that starts before counting of time.
Unfortunately rrdtool does allow you to do so (causing negative timestamps
internally) and also causing to confuse the heck out of the system.
I just reproduced your example and suprisingliy it did work (!) with rrdtool
v1.2.15, but it doesn't with v1.2.29 ... ?!?
So it might be better to stay within meaningful limits ... ;-)
Make sure your RRA stays within the range of unix timestamps (0 - 2^31-1),
so it doesn't start before 1970-01-01 00:00:00 UTC and doesn't reach beyond
2038-01-19 03:14:07 UTC.
Try to change your RRA to:
RRA:AVERAGE:0.5:5:1576800
(which means 30 years) and I assume everything will work.
hth
- Karl
More information about the rrd-users
mailing list