[rrd-users] Re: Changing the Step value

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Wed May 23 01:27:53 MEST 2001


"Meece, Clifford T (MVC)" wrote:

> Is it possible to take an existing RRD that is storing values at the default
> step size (300 seconds) and begin to insert data  at a higher frequency? My
> idea is that I have an existing rrd and now I want to start putting data in
> at 60 second intervals.  I have already made some changes so that the
> rrdtool update is done every 60 seconds, but because the step size is still
> 300, it only records a data point every 300 seconds. 

Well, inserting is possible (as you have noticed) however it isn't
stored that way.

Think of it: you have defined the RRAs to be "x" rows of "y" intervals.
If you change the length of an interval, all RRAs would become invalid.

Assuming an MRTG-compatible database you will have four RRAs (or eight)
with the following properties:

RRA0 600 rows of   300 seconds per interval, total 2d2h
RRA1 700 rows of  1800 seconds per interval, total 14d14h
RRA2 775 rows of  7200 seconds per interval, total 64d14h
RRA3 797 rows of 86400 seconds per interval, total 797d

If you now modify the interval size (which you could do with dump+restore)
you will be modifying the RRAs into:

RRA0 600 rows of    60 seconds per interval, total 10h
RRA1 700 rows of   360 seconds per interval, total 2d22h
RRA2 775 rows of  1440 seconds per interval, total 12d22h
RRA3 797 rows of 17280 seconds per interval, total 159d9h36m

The data in these RRAs is not changed, however if you ask for a "daily"
graph, RRDtool will fetch data from the "weekly" RRA and display it as
if it were the daily graph... (this is because RRDtool "thinks" the
first RRA only covers 10 hours)

Converting an RRD is difficult if not next to impossible.
If you are able to do it, you need to alter all of the RRAs.  Copy
each row 5 times (for a total of 6) and make sure you place them at
the right position.  Also you need to tell the database that the size
of each RRA is different.  It is doable but I wouldn't try.

As a suggestion: start a new database.  During the transition stage
you can fetch data from the new database and from the old database.
Whenever the data from the new database is unknown, use the data from
the old database.

DEF:olddata=myold.rrd....... etcetera
DEF:newdata=mynew.rrd....... etcetera
CDEF:work=newdata,UN,olddata,newdata,IF

"IF" will check the result of "newdata,UN".  If true, it will use
the first value (olddata), else the second value.

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