[rrd-users] Re: Graph for RTT & PacketLoss

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Sat Oct 13 16:03:00 MEST 2001


Younus Suleman wrote:

> Hello All,
> 
> I would like to graph RTT and packet loss as shown in link on the same
> graph with the help of rrdtool.
> http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/gallery/brandon-01.html
> 
> But I have no idea how to use RRDTool's infinite number value (INF) for
> graphing different values of  % packet loss. Any help would be highly
> appreciated.

The INF value is always to the top (or bottom for negative values)
of the graph.  The color is set just like any other element.  If the
value is NaN then nothing is displayed.  No matter what the other
graph elements show, you either get to see the AREA (when the value
*is* INF) or you don't (when the AREA value is NaN).

This is not the most efficient algorithm however it is clear:

   if value anything  set background to color1
   if value above 10% set background to color2
   if value above 25% set background to color3
   if value above 50% set background to color4
   if value above 75% set background to color5

Use "GT" to check:  "x,y,GT" results in true(1) or false(0)

   "packetloss,75,GT"

Use "IF" to set either NaN or INF:  "p,q,r,IF"
In here, "p" is the outcome of "GT".  If true, the next color needs
to be selected.  If false, it should not be selected.
   "p,INF,UNKN,IF"

Combined:  "
   "packetloss,75,GT,INF,UNKN,IF"

The CDEFs:
   CDEF:color1=packetloss,POP,INF
   CDEF:color2=packetloss,10,GT,INF,UNKN,IF
   CDEF:color3=packetloss,25,GT,INF,UNKN,IF
   CDEF:color4=packetloss,50,GT,INF,UNKN,IF
   CDEF:color5=packetloss,75,GT,INF,UNKN,IF

Now plot each color:
   AREA:color1#C0C0FF:"  0- 10%\n"
   AREA:color2#FFFF00:" 10- 25%\n"
   AREA:color3#F0F000:" 25- 50%\n"
   AREA:color4#C0C000:" 50- 75%\n"
   AREA:color5#FF0000:" 75-100%\n"

You shouldn't use this example (for one I didn't test it so it
might contain errors) but I think the mechanism is clear now.
Each color is plot only if the value is INF and not NaN.

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

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