[rrd-users] functionality question

Kempf, Reed rkempf at rightnow.com
Fri Sep 7 23:07:14 MEST 2001

I am currently using rrdtool to graph output for web page load
request-times.  I have a program which acts as a web browser, calculates the
time it takes to successfully retrieve a web page and then dumps the data
into rrdtool.

I have a question about the functionality of rrdtool.  I recently got a
requirement which involves MIN and MAX values for daily, weekly, monthly,
yearly time periods.

I am graphing the data to standard output which then is picked up by html
<img src> and displayed on a web page.  Works really well.
heres the code which does this.

RRDDATE=`date -d "1 day ago" +%s`


        rrdtool graph - \
        --start ${RRDDATE} \
        --title ${TITLE} \
        --vertical-label load_time \
        --imginfo '<IMG SRC="img/%s" WIDTH="%lu" HEIGHT="%lu" ALT="Demo">'\
        --imgformat PNG \
DEF:load_time=/home/rrdtool/data_bases/${NUMBER}.rrd:load_time:AVERAGE \
        CDEF:over=load_time,3,GT,load_time,0,IF \
        HRULE:3#00ff00:"over" \
        AREA:load_time#0000FF:"load time" \
        AREA:over#FF0000:"slow load\\c" \
        COMMENT:Average\: GPRINT:load_time:AVERAGE:%lf%s \
        COMMENT:Min\: GPRINT:load_time:MIN:%lf%s \
        COMMENT:Max\: GPRINT:load_time:MAX:%lf%s\\c \

The problem I am having is that when using AVERAGE for DEF:, the weekly,
monthly, yearly graphs will show the MIN and MAX as AVERAGED values. Whereas
the daily graph will show the true spikes of the day.

Is there a way to graph the true MIN and MAX values for weekly, monthly and
yearly time periods.  
Example: Monday (AVERAGE - 3 secs MIN 1 sec MAX 6 secs)
	   Tuesday (AVERAGE - 2 secs MIN 0 secs MAX 4 secs)
	   Wednesday (AVERAGE - 5 secs MIN 1 sec MAX 10 secs), etc...

Weekly graph would be (AVERAGE 3.33 secs MIN .667 secs MAX 6.66 secs)

I would like to GPRINT for the weekly graph (AVERAGE 3.33 secs MIN 0 secs
MAX 10 secs)

Here is how my rrdtool database is originally created

rrdtool create /home/rrdtool/data_bases/${NUMBER}.rrd \
                --start $RRDDATE \
                --step 300 \
                DS:load_time:GAUGE:1200:0:U \
                RRA:AVERAGE:0.5:1:2500 \
                RRA:MIN:0.5:1:2500 \

Is this possible to fetch MIN and MAX values for a weekly, monthly, yearly
time period?

I am considering using a different tool to create custom graphs (gd
perhaps), but would really like to stay in the rrdtool realm because I've
already put together so much functionality.

Sorry about the length of the question.


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