[rrd-users] Re: Cricket/RRD fetch resolution problem (2nd try)
Scott C. Kennedy
sck at s4r.com
Thu Aug 2 23:11:22 MEST 2001
I've run some queries based on modifying the start & end times to be not in a "2
hour moment", but...
# sh -x /tmp/test_me
+ rrdtool fetch data1.rrd AVERAGE -e 996782400 -s end-31days
+ wc -l
8931
+ rrdtool fetch data1.rrd AVERAGE -e 996782700 -s end-31days
+ wc -l
8931
+ rrdtool fetch data1.rrd AVERAGE -e 996784200 -s end-31days
+ wc -l
8931
+ rrdtool fetch data1.rrd AVERAGE -e 996786000 -s end-31days
+ wc -l
8931
+ rrdtool fetch data1.rrd AVERAGE -e 996786300 -s end-31days
+ wc -l
8931
+ rrdtool fetch data2.rrd AVERAGE -e 996782400 -s end-31days
+ wc -l
375
+ rrdtool fetch data2.rrd AVERAGE -e 996782700 -s end-31days
+ wc -l
376
+rrdtool fetch data2.rrd AVERAGE -e 996784200 -s end-31days
+ wc -l
376
+ rrdtool fetch data2.rrd AVERAGE -e 996786000 -s end-31days
+ wc -l
376
+ rrdtool fetch data2.rrd AVERAGE -e 996786300 -s end-31days
+ wc -l
376
It seems that every query on data1.rrd returns the large number of values, yet every
query on
data2.rrd returns the 2 hr average values.
Maybe, I should look at this a different way, is there a way to specify with RRA to
fetch from?
Scott
Alex van den Bogaerdt wrote:
> Scott C. Kennedy wrote:
>
> > And when I do a query for "-s "now-1month" I should pull 8930 values from the
> > "5minUse" RRA, but sometimes I pull 374 values which seem to come from the
> > "2hrAve" RRA instead of the "5minUse" RRA. Now, I have some RRDs no longer
> > being updated, due to the switch not being used anymore, and the data is
> > historical, but still valid, and the problem doesn't seem to be related to the
> > last updated field.
>
> These kinds of problems are, indeed, not related to the last update
> field.
>
> 8928 values of 5 minutes each is 31 days. 372 values of 2 hours each
> is also 31 days. RRDtool will return one more row (not two) namely
> the value defining your start time. This value is for an interval you
> didn't really specify (as it defines starttime-5m to starttime).
> If another extra row is returned, it will be the interval containing
> your end time (as in: now == 22:37 so return interval 22:35 to 22:40).
>
> Instead of specifying "-s now-1month" try to do these:
> -e 996782400 -s end-31days
> -e 996782700 -s end-31days
> -e 996784200 -s end-31days
> -e 996786000 -s end-31days
> -e 996786300 -s end-31days
>
> It has to do with data availability. If "now" is not an exact multiple
> of 2 hours (in UTC time), you are querying for something that is not
> available in the 2-hour RRA. The closest match is the data in the
> 5-minute RRA. Sometimes "now" happens to be n*7200 seconds since the
> epoch and as it turns out the 2-hour RRA is choosen.
>
> If I'm right (I didn't test it, it's easy enough for you as you have the
> database ready) then the first one will pull data from the 2-hour RRA
> and the others will pull data from other RRAs (such as the 5-minute one).
>
> Oh, and if everything is working as it should you can use the resolution
> flag to rrdtool fetch. *If* the time is an exact multiple of 2 hours,
> you can choose which RRA to use. However, if you try to select the
> 2-hour RRA but fail to query correct start and end times, it fails:
> "--start 00:00 --end 22:00" will work (assuming a timezone that is an
> even number of hours away from UTC) but "--start 00:05 --end 22:05" will
> not work. It will return data from the 5-minute RRA.
>
> HTH
> --
> __________________________________________________________________
> / alex at slot.hollandcasino.nl alex at ergens.op.het.net \
> | work private |
> | My employer is capable of speaking therefore I speak only for myself |
> +----------------------------------------------------------------------+
> | Technical questions sent directly to me will be nuked. Use the list. |
> +----------------------------------------------------------------------+
> | http://faq.mrtg.org/ |
> | http://rrdtool.eu.org --> tutorial |
> +----------------------------------------------------------------------+
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list