[rrd-users] Doubt work rrdtool intervals
spiderslack
spiderslack at yahoo.com.br
Thu Jun 5 00:56:20 CEST 2014
Hi all.
I've been studying the rrdtool tutorial I found very interesting and
fantastic.
http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html
But when trying to play the tutorial with example of my data got the
following output.
+ rrdtool create kakaroto.rrd --start N --step 15
DS:dados:COUNTER:20:U:U RRA:AVERAGE:0.5:1:60 RRA:AVERAGE:0.5:6:5
++ date +%s
+ ATUAL=1401916330
+ sleep 15
++ date +%s
+ rrdtool update kakaroto.rrd 1401916345:2
+ sleep 15
++ date +%s
+ rrdtool update kakaroto.rrd 1401916360:3
+ sleep 15
++ date +%s
+ rrdtool update kakaroto.rrd 1401916375:5
+ sleep 15
++ date +%s
+ rrdtool update kakaroto.rrd 1401916390:7
+ sleep 15
++ date +%s
+ rrdtool update kakaroto.rrd 1401916405:10
+ sleep 15
++ date +%s
+ rrdtool update kakaroto.rrd 1401916420:12
+ sleep 15
++ date +%s
+ rrdtool update kakaroto.rrd 1401916435:15
+ sleep 15
++ date +%s
+ rrdtool update kakaroto.rrd 1401916450:17
+ sleep 15
+ rrdtool fetch kakaroto.rrd AVERAGE --start 1401916330
dados
1401916335: -nan
1401916350: -nan
1401916365: 8.8888888889e-02
1401916380: 1.3333333333e-01
1401916395: 1.5555555556e-01
1401916410: 1.7777777778e-01
1401916425: 1.5555555556e-01
1401916440: 1.7777777778e-01
1401916455: -nan
1401916470: -nan
See that the values are not entered in the exact period
example in period 1401916345 is this between 1401916335 and 1401916350.
but I considered it as if it were entered in the period 1401916350 so my
reasoning is incorrect readjusting my data would thus
1401916335: -nan
1401916350: 2
1401916365: 3
1401916380: 5
1401916395: 7
1401916410: 10
1401916425: 12
1401916440: 15
1401916455: 17
1401916470: -nan
Doing the calculations according to the example of the tutorial
http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html
Using octave
octave:32> abs(2-3)/15
ans = 6.66666666666667E-02
octave:33> abs(3-5)/15
ans = 1.33333333333333E-01
octave:34> abs(5-7)/15
ans = 1.33333333333333E-01
octave:35> abs(7-10)/15
ans = 2.00000000000000E-01
octave:36> abs(10-12)/15
ans = 1.33333333333333E-01
octave:37> abs(12-15)/15
ans = 2.00000000000000E-01
octave:38> abs(15-17)/15
ans = 1.33333333333333E-01
octave:39>
See that the values are different where I am going wrong? thank you
Regards
More information about the rrd-users
mailing list