[rrd-users] overlay plot question

Alex van den Bogaerdt alex at vandenbogaerdt.nl
Sat Apr 17 20:58:34 CEST 2010


----- Original Message ----- 
From: "Stefan Parvu" <stefanparvu14 at yahoo.com>
To: <rrd-users at lists.oetiker.ch>
Sent: Saturday, April 17, 2010 8:44 PM
Subject: Re: [rrd-users] overlay plot question


>> >
>> > maybe plot an AREA with alpha, and stack a line on top of it?
>> >
>> > Not tried it myself, but as a suggestion to try:
>> >
>> > AREA:x#000000CC
>> > LINE1:x#FF0000::STACK
>
> had some problems with my yahoo uk email...
> tried again to send:
>
> I could use something like:
>
> AREA:cpuu#00ff00:"CPU Util"
> LINE1:runq#0000ff:"Run-q"

I was (after the correction I made) thinking about:

AREA:cpuu_percent#80808020:"CPU Util"
AREA:runq_percent#80808020:"Run-q"
LINE1:cpuu_percent#0000FF
LINE1:runq_percent#FF0000

*IF* it works (I didn't try it), then it works because the areas are 
transparent and their combined value makes the plot darker. Notice how its 4 
groups of digits, not 3, it has an alpha component: RRGGBBAA.  You can also 
use RGBA.  Experiment a bit with the color and alpha values.

The lines don't have an alpha component, thus using the default of 0xFF, 
solid line.  If you are concerned about one line overlapping the other, try 
adding alpha 0xCC or so.

> But how about the y-axis +20%, +40%, probable that
> I should define myself ?

Using CDEF, if not already a percentage.
If you get fractions of 1, multiply by 100.
If you get some value suchs as 75 out of 255, muliply by 100 and divide by 
255.
And so on.
If you use a value which is not some part of a set maximum, define a sane 
one yourself and do something like: if value>max*1.1 then percent=110 else 
percent=100*value/max.  The various tutorials help you with CDEF should it 
be necessary.

HTH
Alex




More information about the rrd-users mailing list