ok, but home come when i graph:

rrdtool graph /var/www/html/rrdtool/eth0.gif \
        --start -1800 --vertical-label bytes/second \
        --title "eth0 Traffic Monitor" \
        DEF:inoctets=/var/www/html/rrdtool/eth0.rrd:input:AVERAGE \
        DEF:outoctets=/var/www/html/rrdtool/eth0.rrd:output:AVERAGE \
        CDEF:over=outoctets,20000,GT,outoctets,20000,-,0,IF \
        HRULE:20000#0F0000:"Limit of Sensible Load" \
        LINE2:inoctets#00FF00:"In traffic" \
        AREA:outoctets#0000FF:"Out traffic" \
        STACK:over#FF0000:"Over speed"

the red stack is drawn 5000 points higher than the horizontal line?
shouldn't they be the same? also, I think this 5000 is relative to the AREA

On Sat, Oct 26, 2002 at 05:24:18 +0200, Alex van den Bogaerdt wrote:
> 
> On Sat, Oct 26, 2002 at 03:59:34PM +0100, Mat Harris wrote:
> >     DEF:myspeed=test.rrd:speed:AVERAGE              \
> >     "CDEF:kmh=myspeed,3600,*"                       \
> >     CDEF:fast=kmh,100,GT,100,0,IF                   \
> >     CDEF:over=kmh,100,GT,kmh,100,-,0,IF             \
> 
> Always have the manual page at hand.  Do exactly what RRDtool
> would do and calculate the stuff by hand.
> 
> CDEF:over=kmh,100,GT,kmh,100,-,0,IF
> 
> GT does this:                   if a>b return 1 else return 0
> and is wriiten down like this:  a,b,GT
> 
> -  does this:                   return a - b
> and is written down like this:  a,b,-
> 
> IF does this:                   if a then b else c
> and is written down like this:  a,b,c,IF
> 
> 
> Work from left to right: CDEF:over=kmh,100,GT,kmh,100,-,0,IF
> CDEF:over= create new variable called over
> kmh        get variable kmh and store on stack
>            The stack contains one value
> 100        store 100 onto stack
>            The stack contains two values
> GT         function!  get the variables a and b and store the result
>            Two elements are removed from the stack (leaving none), then
>            the result of the GT function is pushed back
>            The result is now 1 if kmh is greater than 100
> kmh        get variable kmh and store on stack
>            The stack contains two values: the result of GT and the
>            variable kmh.
> 100        store 100 onto stack
>            The stack contains three values
> -          function!  get the variables a and b and store the result
>            Two elements are removed from the stack (kmh and 100), then
>            the result of the '-' function is pushed back
> 0          store 0 onto the stack
>            The stack now contains: (result of GT),(kmh-100),0
> IF         function!  Remove a,b and c from the stack (which is then
>            empty) and return either b or c, depending on a.
> 
> In other words:
>     CDEF:over=kmh,100,GT,kmh,100,-,0,IF
> means
>     if (kmh > 100)
>     then
>         return kmh-100
>     else
>         return 0
>     fi
> 
> 
> No more additional examples.  I'm having a case of deja vu at the moment.
> 
> -- 
> Unsubscribe mailto:[EMAIL PROTECTED]
> Help        mailto:[EMAIL PROTECTED]
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

-- 
Mat Harris                      OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]       matthewh.genestate.com  

-- Binary/unsupported file stripped by Ecartis --
-- Err : No filename to use for decode, file stripped.
-- Type: application/pgp-signature


--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to