[rrd-users] Cleaning a messed up rrdtool data file

David Landgren david at landgren.net
Fri Mar 4 13:09:58 MET 2005


List,

I have an rrdtool database that polls my main router to the net. From 
time to time there was an ugly 70Mb spike in the graph, and I didn't pay 
too much attention, thinking that it was just some sort of counter 
rollover or something. It was never a sufficient annoyance to bother 
looking into it more closely.

This week, the line was upgraded from 2Mb to 6Mb and as I was puttering 
around with my graphing tools I noticed that I was running two copies of 
my polling script that was updating the rrd file. And so it makes sense 
to me that that was the source of the spikes. Now I'd like to try and 
clean up the historical data.

I've generated two graphs, one clamped rigidly to the maximum expected y 
value, and the other with y autoconfigured:

     http://www.landgren.net/rrdtool.html

At first I was thinking I could use something like

   result=number,256000,GT,UNKN,number,IF

but then I'll clamp new legitimate values that'll be coming down the 
wire. If I clamp to the new higher value I'll have spikes in the old 
traffic values. I'd really like to have clean data so that I can point 
and say "look, before... and after".

Therefore, is there a way of saying:

   "if date before d0, then clamp to lim1 else clamp to lim2"

The second approach I considered would be to go into the rrd file and 
iterate over the values, looking for peaks greater than 2Mb, and 
replacing them by a linear interpolation between to the two points 
either side of the peak?

The maths doesn't pose much of a problem, I'm wondering about the 
mechanics of going through the datapoints in the rrd file.

Thanks for any pointers I can use to either approach (or if there's a 
third...),

David

--
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