[rrd-users] multiple stack graph

Simon Hobson linux at thehobsons.co.uk
Mon Aug 23 11:46:31 CEST 2010

James Nunnerley wrote:

>>That should work, but it might help just a teensie bit if you gave
>>some clue as to the meaning of "not working" ! Does it mean you get a
>>plot but it doesn't look like you expect, or nothing happens, or you
>>get an error, or ... ?
>>/usr/bin/rrdtool graph /var/www/graphs/
>>-s -1day -a PNG -i -z --alt-y-grid -h 125 -l 0 -u 100 -r \
>>--color SHADEA#EAE9EE --color SHADEB#EAE9EE --color BACK#EAE9EE
>>--vertical-label "partition used %" -t "Disk usage" -b 1024 \
>>DEF:avail1=/etc/rrdtool/ \
>>DEF:avail2=/etc/rrdtool/ \
>>AREA:usedpct1#4169E1:"used disk" \
>>STACK:availpct1#32CD32:"free disk"\\j
>>CDEF:MBtotal1=total1,1048576,* \
>>CDEF:usedpct2neg=0,usedpct2,- \
>>AREA:usedpct2neg#4169E1:"used disk"
>>STACK:availpct2neg#32CD32:"free disk"\\j \
>>CDEF:MBtotal2=total2,1048576,* \

>Sorry I should have explained... it's basically not showing the 
>second lot of data.  It shows it at the bottom in the data table, 
>but not on the graph...

So the legend shows all the right values, but the graph itself 
doesn't show anything ?

A couple of ideas :

1) try substituting fixed numbers, eg

2) try a different formula, eg

See if either make a difference.

Hmm, takes another look and consults the docs ...

But before doing that, you may want to take a look at your Y axis 
scaling options :
  -l 0 -u 100 -r
Which as I read it, means scale from 0 to 100, rigidly. So the Y axis 
won't extend to negative numbers. Changing to -l -100 ought to fix it.

Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

More information about the rrd-users mailing list