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

Peter Thurner p.thurner at heinlein-support.de
Thu Mar 20 15:49:01 CET 2014

Hi guys,

I was wondering how the data in the RRD Databases is saved. When I'm
saving the value 19000, and then use rrdtool fetch to receive it, I get
the following back:

 946857600: 1.8958333333e+04

I was wondering how to (manually) calculate back 1.8958333333e+04 to 19000?

Also I noticed that when I just save the value 19000 in all slots, it
does show me

947289600: 1.9000000000e+04

but when I alternate values "around" it, they change. Are the saved
values related to each other in some way?

Did I overlook something in my script (attached)?

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
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

Thanks in advance,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rrd-test.sh
Type: application/x-shellscript
Size: 1860 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20140320/4afab331/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20140320/4afab331/attachment-0001.pgp 

More information about the rrd-users mailing list