[rrd-users] Re: Still struggling with RRD & RPN. where's the pb, all looks good to me.

Laurent LEVIER llevier at argosnet.com
Tue Apr 27 08:01:32 MEST 2004


At 23:21 26/04/2004, Hugo van der Kooij wrote:
>Which I would translate as ...
>
> >          'CDEF:Cnxs=input,300,LE,input,300,IF' \
>
>IF (input < 300)
>THEN Cnxs = input
>ELSE Cnxs = 300
>
> >          'CDEF:CnxsOrange=input,600,GE,300,input,IF' \
>
>IF (input >= 600)
>THEN CnxsOrange = 300
>ELSE CnxsOrange = input

Agree, except a mistake I corrected.
The new CnxsOrange is now: 'CDEF:CnxsOrange=input,600,GE,300,input,300,-,IF' \
which is correct.

>Not quit. It means Cnxs is cut short at 300.
Yes, if value is > 300, which is correct.

>But Cnxsorange is cut if it exceeds 600 back to 300. Or else it will hold
>input which might be anywhere from 0 to 599.

That is normal. If value is 700 for example, my drawing will be:
300 green (300)
300 orange (300)
100 red (input-600, so 700-600)
That is the expected result. Keep in mind I stack drawings.

>So if input is 450 you would get Cnxs=300 and Cnxsorange=450 which would
>stack for a nice value of 750 which I think should be quite red.

Yes, sorry, that was my mistake I corrected with the update.

If you read the update I sent, you will see I corrected the CDEF for Orange.
The result is now fine except one point: UN values are set to -300 and I 
see no reason for this.
Here is the whole definition producing this result:

rrdtool graph NbCnx-7d.gif -a GIF \
         -h 200 -s -652800 -v "Number of Connections" \
         'DEF:cnxs=NbCnx.rrd:cnxs:AVERAGE' \
         'CDEF:input=cnxs,UN,0,cnxs,IF' \
         'CDEF:Cnxs=input,300,LE,input,300,IF' \
         'CDEF:CnxsOrange=input,600,GE,300,input,300,-,IF' \
         'CDEF:CnxsRed=input,600,GE,input,600,-,0,IF' \
         'AREA:Cnxs#00FF00' \
         'STACK:CnxsOrange#FF9F00' \
         'STACK:CnxsRed#FF0000' \
         'GPRINT:cnxs:LAST:Last Number of Connections\: %2lf' \
         'GPRINT:cnxs:AVERAGE:Average Number of Connections\: %2lf'


Laurent LEVIER
Systems & Networks Security Expert, CISSP CISM


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