[rrd-users] Re: I need help to create a specific rrd file (LONG EMAIL)
Alex van den Bogaerdt
alex at ergens.op.het.net
Fri May 30 12:03:29 MEST 2003
On Thu, May 29, 2003 at 12:12:41PM +0200, Iñaki Martínez wrote:
> Well i have been trying to create a rrd file as i want but i think it is not
> correct. I did ask some time ago but i need ask again and i hope it is last.
> I want to store data for 5 years or more, but 5 years are enough.....
> I also want to do the following graphs (i already have the scripts):
> * Hourly graph:
> rrdtool graph file.png --start XXX-2h --end XXX --height 150 --width 395 -x MINUTE:60:HOUR:1:HOUR:1:0:%H:%M
> NOTE: XXX can be any hour from the five year data, so i can view any hour of
> any day of any week of any month of any year of the five years in the rrdtool
395 intervals which cover 2 hours together. Not nice. Why not 400 pixels
that cover those two hours? 7200 seconds (2 hours) divided by 400 is a nice
whole integer whereas with 395 pixels each pixel should represent 18.2278481012
> rrdtool graph file.png --start XXX-27h --end XXX --height 150 --width 395 -x MINUTE:60:HOUR:1:HOUR:1:0:%k
> NOTE: XXX can be any day from the five year data, so i can view any day of
> any week of any month of any year of the five years in the rrdtool file.
Why 27 hours? Why 395 pixels?
Try to fetch data from the database which can be "dumped on screen" as is
without haveing to do extra calculations.
> rrdtool create file.rdd --start DATE --step 60 \
> DS:in:DERIVE:600:0:4294967295 \
> DS:out:DERIVE:600:0:4294967295 \
> RRA:AVERAGE:0.5:1:600 \
This is just 600 intervals of 1 times the step size (60 seconds) so just
10 hours. You want to have 5 years (366+365+365+365+366 days) worth of
data so you should store (365*5+2)*(24*60) rows.
This is 2630880 rows, not 600.
> RRA:AVERAGE:0.5:6:700 \
This allows you to see 700 rows of 6*60 seconds is 252000 seconds.
Either use the first created RRA to generate the graph, or create an
RRA which covers the desired time span (5 years) in the resolution you
are going to graph it. Suggestion: 360 pixels with 4 minutes per pixel
will result in 360*4 minutes which is one day exactly. You need to
store (365*5+2) days times (1440/4) intervals is 657720 rows.
> RRA:AVERAGE:0.5:24:775 \
> RRA:AVERAGE:0.5:288:3725 \
do similar for these
> RRA:MAX:0.5:1:1:600 \
> RRA:MAX:0.5:6:700 \
> RRA:MAX:0.5:24:775 \
> RRA:MAX:0.5:288:3725 \
make the numbers equal to the previously calculated numbers.
BTW this results in a huge database.
It is enough to only have the 1st RRA (one time for AVG, one time for MAX)
and use it to create all graphs. Using extra diskspace by generating the
other RRAs will result in less time spent while generating the graphs.
You should answer the question: Do I want to trade diskspace for speed?
Much of what looks like rudeness in hacker circles is not intended to give
offence. Rather, it's the product of the direct, cut-through-the-bullshit
communications style that is natural to people who are more concerned about
solving problems than making others feel warm and fuzzy.
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
More information about the rrd-users