[rrd-users] How are the values saved / calculated inside the RRDs when showing with fetch

Simon Hobson linux at thehobsons.co.uk
Thu Mar 20 16:09:17 CET 2014


Peter Thurner <p.thurner at heinlein-support.de> wrote:

> I was wondering how the data in the RRD Databases is saved.

It is normalised and consolidated, except under certain vary precise conditions it doesn't sotre the values you put in.
See http://www.vandenbogaerdt.nl/rrdtool/ - in particular the one on Rates, normalizing and consolidating.

> Also what I don't understand is that rrdtool fetch always gives me a
> seconds timestamp one hour after the time I tried to commit to the RRD:
> 
> last line of rrdtool fetch output in my script:
> 947808000: -nan
> 
> blue at aptenodytes:~/test$ date -d "Jan 14 2000" +%s
> 947804400
> blue at aptenodytes:~/test$ date --date @947804400
> Fri Jan 14 00:00:00 CET 2000
> 
> # The timestamp I get from fetch:
> blue at aptenodytes:~/test$ date --date @947808000
> Fri Jan 14 01:00:00 CET 2000

Fetch does tend to include the end time of the currently accumulating bucket - which is normally unknown and so reports as NaN. Also, be aware that RRD always works in UTC, so if you have (say) a consolidation of 86400 seconds/CDP (Consolidated Data Point) then you will only see timestamps for CDPs that are at 1AM CET - or 2AM when you are on summer time.



More information about the rrd-users mailing list