[rrd-users] STACK confusion
linux at thehobsons.co.uk
Sat Jul 9 10:35:53 CEST 2011
Rick Dicaire wrote:
>Hi folks, is '0' considered unknown when stacking?
No - but bear in mind that anything stacked on top of unknown is also
considered unknown for drawing purposes.
>I have 5 DS's, and I'm trying to stack them, most of the time each DS
>value is 0.00:
>rrdtool lastupdate /var/db/rrd/hdd_tput.rrd
> ada0 ada1 ada2 ada3 ad4
>1310189105: 0.00 0.00 0.00 0.00 0.00
>When graphing, I use this order: ad4 ada0 ada1 ada2 ada3
>I STACK ada0 ada1 ada2 ada3.
>If ad4 has a non-zero value, its correct value is graphed, using the
>color configured for ada3.
>Here are the definitions:
> "GPRINT:ad4:LAST:%4.0lf %s\\t",
> "GPRINT:ada0:LAST:%4.0lf %s\\t",
> "GPRINT:ada1:LAST:%4.0lf %s\\t",
> "GPRINT:ada2:LAST:%4.0lf %s\\t",
> "GPRINT:ada3:LAST:%4.0lf %s\\l"
>Example can be seen here http://www.ardynet.com/~ardy/ad4.png
>How can I stack each DS?
You have ;-)
Yes, it took me a few moments to work out what's happened here, but
prepare for that "Doh" moment.
You draw a line at the value of ad4, then you stack on top of it a
line for ada0, then ada1 ... ada3. ada0 - ada3 are zero, so where do
those lines get drawn ? Yes, right in the exact same pixels as the
line you drew for ad4.
So you've drawn a pink line, then overdrawn it with red, yellow,
green, and finally blue lines - so all you see is the last one drawn,
If you change line to area I think you'll find it works out.
Alternatively you could try experimenting with transparency (the 4th
octet in the colour definition, eg 0000FF7F would draw a half
transparent blue line) or dashes.
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