[rrd-users] [newbie] Wrong minimum value ?

Nicodem demoln at hotmail.fr
Fri Jan 9 11:54:02 CET 2009


Hello,

I'm new with rrdtool and try to understand its behavior.

First i create a database named "temp" which purpose is to store
temperature.
In the following command line:

# rrdtool create temp.rrd --start 1231138800 --step 10 \
DS:temp:GAUGE:600:U:U \
RRA:AVERAGE:0.5:1:10 \
RRA:MIN:0.5:3:10 

I understand that :
1) the db start at timestamp 1231138800 (ie : Mon Jan  5 08:00:00 2009), and
"must" be updated every 10 seconds
2) DataSource "temp" of type "GAUGE". 
If more than 600 seconds pass since last update the actual value will be set
to "unknown"
No range values defined
3) 4 archives are defined
First one stores the supplied temperatures (10 values stored)
Second one stores the minimum value of the last 3*10= 30 seconds

Then I manually insert temperatures from timestamp 1231138810 to 1229295700.
Don't care about the rapid variations in temperature, ecologists say that
earth is sick ;-)

# rrdupdate ./temp.rrd 1231138810:15
# rrdupdate ./temp.rrd 1231138820:10
# rrdupdate ./temp.rrd 1231138830:5
# rrdupdate ./temp.rrd 1231138840:22
# rrdupdate ./temp.rrd 1231138850:18
# rrdupdate ./temp.rrd 1231138860:2
# rrdupdate ./temp.rrd 1231138870:16
# rrdupdate ./temp.rrd 1231138880:13
# rrdupdate ./temp.rrd 1231138890:17
# rrdupdate ./temp.rrd 1231138900:0

Fetched values from the first RRA (RRA:AVERAGE:0.5:1:10) match the supplied
values.
Ok for me  !

# rrdtool fetch ./temp.rrd AVERAGE --start 1231138800 --end 1231138900
                           temp

1231138810: 1.5000000000e+01
1231138820: 1.0000000000e+01
1231138830: 5.0000000000e+00
1231138840: 2.2000000000e+01
1231138850: 1.8000000000e+01
1231138860: 2.0000000000e+00
1231138870: 1.6000000000e+01
1231138880: 1.3000000000e+01
1231138890: 1.7000000000e+01
1231138900: 0.0000000000e+00
1231138910: nan


The place where i'm not ok, is the fetched values of the second RRA
(RRA:MIN:0.5:3:10 ) :

# rrdtool fetch ./temp.rrd MIN --start 1231138800 --end 1231138900
                           temp

1231138830: 5.0000000000e+00
1231138860: 2.0000000000e+00
1231138890: 2.0000000000e+00
1231138920: nan

At timestamp 1231138830 the stored value is 5.
I suppose this is the minimum value of the followings :
1231138810: 15
1231138820: 10
1231138830: 5

At timestamp 1231138860 the stored value is 2
I suppose this is the minimum value of the followings :
1231138840: 22
1231138850: 18
1231138860: 2
 
At timestamp 1231138890 the stored value is 2 !!!!!!!!!
That's what i don't understand :
According to the two previous min fetched values i expect to find 13 at this
timestamp :

1231138870: 16
1231138880: 13 <-- Not the mimimum of the three values ?
1231138890: 17

Where is the mistake ?
-- 
View this message in context: http://n2.nabble.com/-newbie--Wrong-minimum-value---tp2132656p2132656.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list