[rrd-users] STACK and LINEx using graph

Tony rrdtool at cerbernet.co.uk
Mon Apr 21 19:18:52 MEST 2003


I'm new to rrdtool but I'm slowly getting to grips with it.
I can create a database, enter data and create a graph based on the data
in the database.

However getting the graph to display as I want is a pain.
I want to use the STACK option when drawing the graph but for some
reason it changes the value down the left hand side of the graph, from
correct whole numbers to decimal lower numbers.

Let me explain.
I am logging call stats from a dialup box.
I am logging number of async calls, number of ISDN calls and the total
of the 2, so 3 data values.

If I use the LINEx option to draw the graph the values down the left
hand side of the graph show, 0,100,200,300, etc to whatever the highest
total value is 600.
But if I use the STACK option the values down the left hand side of the
graph show, 0, 1.0, 2.0 etc.
However the legend at the bottom shows the correct current value of the
last data entered into the database.

Is this something STACK does by default or can it be changed?
I'd like to have my graph look the way STACK draws it.

Here is my create database line.

rrdtool create call-stats.rrd -s 300 \
DS:async:GAUGE:600:U:U DS:isdn:GAUGE:600:U:U \
DS:total:GAUGE:600:U:U  \ 
RRA:AVERAGE:0.5:1:576 \
RRA:AVERAGE:0.5:6:672 \
RRA:AVERAGE:0.5:24:732 \
RRA:AVERAGE:0.5:144:1460 \
RRA:MAX:0.5:1:576 \
RRA:MAX:0.5:6:672 \
RRA:MAX:0.5:24:732 \
RRA:MAX:0.5:144:1460 \
RRA:LAST:0.5:1:576 \
RRA:LAST:0.5:6:672 \
RRA:LAST:0.5:24:732 \

Here is what I use to create the graph using the STACK option.

rrrdtool graph speed.gif  --start -1day -t "Call Sessions" \
 --vertical-label Calls
DEF:calls1=call-stats.rrd:async:LAST  \
DEF:calls2=call-stats.rrd:isdn:LAST \
DEF:calls3=call-stats.rrd:total:LAST \
AREA:calls1#FF0000:Async GPRINT:calls1:LAST:"LAST\\:%.0lf" \
STACK:calls2#0000FF:ISDN GPRINT:calls2:LAST:"LAST\\:%.0lf" \
STACK:calls3#00C000:Total GPRINT:calls3:LAST:"LAST\\:%.0lf"

Thanks in advance.


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