[rrd-developers] Re: Example for the STACK problem

Alan Lichty alan_lichty at eli.net
Tue Aug 3 19:15:02 MEST 1999


Alex -

Try the following hack:

ex2a.png:    example.rrd
        rrdtool graph ex2a.png \
        --start 933631200 \
        --end   933634800 \
        --lower-limit 0 \
        DEF:val1=example.rrd:val1:AVERAGE \
        DEF:val2=example.rrd:val2:AVERAGE \
        DEF:val3=example.rrd:val3:AVERAGE \
        CDEF:val1a=val1,UN,0,val1,IF \
        CDEF:val2a=val2,UN,0,val2,IF \
        CDEF:val3a=val3,UN,0,val3,IF \
        AREA:val1a#FF0000:"Value 1" \
        GPRINT:val1a:AVERAGE:"Average %6.2lf\\n" \
        STACK:val2a#00C000:"Value 2" \
        GPRINT:val2a:AVERAGE:"Average %6.2lf\\n" \
        STACK:val3a#0000FF:"Value 3" \
        GPRINT:val3a:AVERAGE:"Average %6.2lf\\n"

and then 

example:        ex1.png ex2.png ex2a.png
	 echo '<IMG SRC=ex1.png><BR><IMG SRC=ex2.png><BR><IMG SRC=ex2a.png>' > example.html

This shows a graph that allows us to view the first and third values
in spite of the second having some unknown data.

Alan

On Tue, 3 Aug 1999, Alex van den Bogaerdt wrote:

> Hi,
> 
> It seems that there is some confusion about the problem.
> To make sure we're talking about the same problem, I've
> included a Makefile that should produce two graphs for
> you to view. It creates example.rrd, example.html, ex1.png
> and ex2.png so if you have one of those around, make sure
> not to overwrite the real one.
> 
> The resulting graphs show that value3 (blue) is known but
> is not graphed in the second png.
> 
> Please note that there is *NO* adding whatsoever so this is
> not the (valid) behaviour of (#1+#2+#3 == unknown) when #2 is unknown.
> 
> Regards,
> Alex
> 
> Makefile:
> example:        ex1.png ex2.png
>         echo '<IMG SRC=ex1.png><BR><IMG SRC=ex2.png>' > example.html
> 
> clean:
>         -rm ex1.png ex2.png example.rrd example.html
> 
> ex1.png:        example.rrd
>         rrdtool graph ex1.png \
>         --start 933631200 \
>         --end   933634800 \
>         --lower-limit 0 \
>         DEF:val1=example.rrd:val1:AVERAGE \
>         DEF:val2=example.rrd:val2:AVERAGE \
>         DEF:val3=example.rrd:val3:AVERAGE \
>         AREA:val1#FF0000:"Value 1" \
>         GPRINT:val1:AVERAGE:"Average %6.2lf\\n" \
>         AREA:val2#00C000:"Value 2" \
>         GPRINT:val2:AVERAGE:"Average %6.2lf\\n" \
>         AREA:val3#0000FF:"Value 3" \
>         GPRINT:val3:AVERAGE:"Average %6.2lf\\n"
> 
> ex2.png:        example.rrd
>         rrdtool graph ex2.png \
>         --start 933631200 \
>         --end   933634800 \
>         --lower-limit 0 \
>         DEF:val1=example.rrd:val1:AVERAGE \
>         DEF:val2=example.rrd:val2:AVERAGE \
>         DEF:val3=example.rrd:val3:AVERAGE \
>         AREA:val1#FF0000:"Value 1" \
>         GPRINT:val1:AVERAGE:"Average %6.2lf\\n" \
>         STACK:val2#00C000:"Value 2" \
>         GPRINT:val2:AVERAGE:"Average %6.2lf\\n" \
>         STACK:val3#0000FF:"Value 3" \
>         GPRINT:val3:AVERAGE:"Average %6.2lf\\n"
> 
> example.rrd:
>         rrdtool create example.rrd \
>         --start 933631200 \
>         --step 10 \
>         DS:val1:GAUGE:7200:U:U \
>         DS:val2:GAUGE:7200:U:U \
>         DS:val3:GAUGE:7200:U:U \
>         RRA:AVERAGE:0:1:360
>         rrdtool update example.rrd \
>                 933632400:100:50:25
>         rrdtool update example.rrd \
>                 933633600:100:U:25
>         rrdtool update example.rrd \
>                 933634800:100:50:25
> 
> --
> * To unsubscribe from the rrd-developers mailing list, send a message with the
>   subject: unsubscribe to rrd-developers-request at list.ee.ethz.ch
> 
> 
> 

--
* To unsubscribe from the rrd-developers mailing list, send a message with the
  subject: unsubscribe to rrd-developers-request at list.ee.ethz.ch



More information about the rrd-developers mailing list