[rrd-users] Error in database?
Mats Gustafsson
gentoo at mats-gustafsson.se
Thu Mar 5 12:35:25 CET 2009
Karl, I think you are right :-)
I have been investigating this problem for over one month now, so I can
tell you that your help is really appreciated :-)
I just tried with three databases: one that is 30 years long, one that
is 20 rows long and one that is 50 years long. And in accordance with
your prediction the two first are ok while the third one fails.
I guess that this explains why my databases all of a sudden stopped
working one month ago. It must have been when the new rrdtool version
was released in Gentoo and I updated to it.
My issue now is that I have been updating four databases (50 years long
each) with information for almost two years now, and I'd rather not
throw away all that data.
I see three possibilities:
1. Re-arrange my old databases and reduce them to 30 years length.
2. Wait for a new release of rrdtool that behaves in the same way as the
old version.
3. Create new databases and throw away all my collected data.
What would you recommend?
Many thanks!
/Mats
Karl Fischer wrote:
> 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