[rrd-users] Re: STACK and LINEx using graph

Hugo van der Kooij hvdkooij at vanderkooij.org
Mon Apr 21 22:27:54 MEST 2003


On Mon, 21 Apr 2003, Tony wrote:

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

Hmm. If async+isdn=total then there is no need to store total. You can 
calculate it later.

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

I would propose:

rrdtool graph speed.gif  --start -1day -t "Call Sessions"	\
	--vertical-label Calls					\
	DEF:async=call-stats.rrd:async:LAST			\
	DEF:isdn=call-stats.rrd:isdn:LAST			\
	CDEF:total=calls=isdn,async,+				\
	AREA:async=#FF0000:Async				\
	GPRINT:async:LAST:async:LAST:"Last \:%4.0lf"		\
	AREA:isdn=#0000FF:ISDN					\
	GPRINT:isdn:LAST:isdn:LAST:"Last \:%4.0lf"		\
	LINE1:total=#000000:Total				\
	GPRINT:total:LAST:total:LAST:"Last \:%4.0lf"		\

Two area's stacked on top of one another and topped of by a line.

Pretty much the way I do on my CPU graphs on 
http://hvdkooij.xs4all.nl/stats-dag.cms

See the scripts on http://hvdkooij.xs4all.nl/stats/

Hugo.

-- 
 All email sent to me is bound to the rules described on my homepage.
    hvdkooij at vanderkooij.org		http://hvdkooij.xs4all.nl/
	    Don't meddle in the affairs of sysadmins,
	    for they are subtle and quick to anger.


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