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
-- 
   __________________________________________________________________
 / [EMAIL PROTECTED]                  [EMAIL PROTECTED] \
| 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:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to