[rrd-users] Re: increasing time resolution

Alex van den Bogaerdt alex at ergens.op.het.net
Tue Sep 13 12:53:32 MEST 2005


On Tue, Sep 13, 2005 at 11:19:26AM +0200, Leif Neland wrote:
> I want to take measurements (temperature, gauge) every 60 seconds instead of 
> every 300 seconds.
> 
> I created the rrd with 300 seconds step, but I already run rrdtool update 
> every 60 seconds.

Those extra updates are "lost".  This isn't entirely accurate but for
the purpose of this discussion it is.

> I tried rrdtool resize to add more points, then I dumped the rrd, edited 300 
> seconds step to 60 and imported it.
>
> But the data is not interpolated, merely re-labeled, so the timescale is 
> compressed 5 times.

So you had "10 11 10 11 12" describing an interval of 5 times 300
seconds, and ended up with "10 11 10 11 12" describing an interval of 5
times 60.  That's quite right, yes.  An RRA is a series of numbers (rates
during time) at defined intervals (number of PDPs per CDP). You've
modified the duration of a PDP, therefore you've altered the data.

> Any way of keeping the existing data, but enhanching time-resolution on new 
> data?

I saved the best for last.  Also: I didn't debug what I describe here.
Use it as a generic guideline to experiment.

approach #1:
Create a new database.  Make sure step==60 and heartbeat is large,
large enough to insert data from the next steps.  Also make sure to set
start to a time in the past, so that you can enter historic data.
For people wanting to do this with another kind of counter: you must
use gauge at this point, you can change this later.

Collect values from the previous database and store them with their
timestamp.  You could use the output of "rrdtool dump" but you could
also try a series of fetch commands.

Insert those values into your new database, using rrdtool update, oldest
first.

Alter the new database (rrdtool tune) so that it has more desirable
settings for heartbeat.  You want gauge so you need not change this,
people doing this procedure for another kind of counter must change
it here (with rrdtool tune as well).

Problem: it is hard to near impossible to keep minimum and maximum rates
should you have those.

approach #2:
Dump your database. Modify your xml file so that step becomes 60, change
the number of rows in each RRA (multiply by 5) and generate the missing
entries.  This means you take one row "r", duplicate it four times (to
get "d1 d2 d3 d4 r", adjust their timestamps, redo for the next line until
finished.  Timestamps are _end_ of interval.

Restore this database.

Problem: you need to know exactly what you are doing or else you end
up with a database that looks good, until you run into problems.

approach #3:
Keep the old database.  Create a new database.  Use both in rrdtool graph
where desired.

DEF:olddata=....
DEF:newdata=....
CDEF:usedata=TIME,x,LT,olddata,newdata,IF     (fill in x)
LINE1:usedata#FF0000:....


HTH
Alex

--
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://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list