[rrd-users] Re: fetch resolution??

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Tue Jul 3 01:13:28 MEST 2001


Carlos Carvalho wrote:

> % rrdtool fetch archive.rrd AVERAGE > dump
> % rrdtool fetch archive.rrd AVERAGE -r 600 > dump-600

This second line will only work when the current time is
an exact multiple of 600.  So, you have a chance of 1:600
that this works.

Try something like:

NOW=`date +%s`
END=$((NOW/600*600))
rrdtool fetch archive.rrd AVERAGE --end $END -r 600

if this doesn't work on your platform:
$((NOW/600*600)) should create 994115400 out of 994115464.
994115464 = n*600 + 64 where n is some integer.

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