[rrd-users] Graphing a negative value, while using --logarithmic
Jason Lixfeld
jason-rrdtool at lixfeld.ca
Sat Sep 17 00:24:22 CEST 2011
I apologize in advance if dups of this message appear throughout the day. There are a couple of variations on this email that are sitting in the moderator queue, which I hope get deleted :)
Has anyone been successful with graphing logarithmic math on the negative axis?
I'm trying to graph three different types of packets in two directions on an interface:
In the inbound direction, on the positive axis:
ifHCInBroadcastPkts
ifHCInMulticastcastPkts
ifHCInUcastPkts
In the Outbound direction, on the negative axis:
ifHCOutBroadcastPkts
ifHCOutMulticastcastPkts
ifHCOutUcastPkts
Because in my environment, generally Unicast packet counts would far exceed multicast or broadcast counts, I want to use --logarithmic to try and get all the values to appear on the graph. The issue arises when I tried to apply an inverse CDEF calculation. I have tried CDEFs like 1,$value,/ and $value,-1,* and neither works. I'm wondering if anyone has any insight.
Below are copies of my graph statements using both variations of the CDEF math, of which neither work.
Grateful for any insight.
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title='(64-bit) bpe01.151front711 - Packets In/Out - Gi0/0/0 - Facing gi0-1-0-6.bfr01.77mowat01' \
--base=1000 \
--height=120 \
--width=750 \
--alt-autoscale \
--logarithmic \
--vertical-label='packets/sec' \
--slope-mode \
--font TITLE:8: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/html/cacti/rra/657/47788.rrd":bcast_in_hc:AVERAGE \
DEF:b="/var/www/html/cacti/rra/657/47789.rrd":mcast_in_hc:AVERAGE \
DEF:c="/var/www/html/cacti/rra/657/47790.rrd":unicast_in_hc:AVERAGE \
DEF:d="/var/www/html/cacti/rra/657/47788.rrd":bcast_out_hc:AVERAGE \
DEF:e="/var/www/html/cacti/rra/657/47789.rrd":mcast_out_hc:AVERAGE \
DEF:f="/var/www/html/cacti/rra/657/47790.rrd":unicast_out_hc:AVERAGE \
CDEF:cdefbc=1,d,/ \
CDEF:cdefbg=1,e,/ \
CDEF:cdefca=1,f,/ \
AREA:a#EACC00FF:"Broadcast In" \
GPRINT:a:LAST:" Current\:%8.2lf%s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n" \
AREA:b#EA8F00FF:"Multicast In":STACK \
GPRINT:b:LAST:" Current\:%8.2lf%s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:b:MAX:"Maximum\:%8.2lf%s\n" \
AREA:c#FF0000FF:"Unicast In":STACK \
GPRINT:c:LAST:" Current\:%8.2lf%s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:c:MAX:"Maximum\:%8.2lf%s\n" \
LINE3:cdefbc#EACC007F:"Broadcast Out" \
GPRINT:d:LAST:"Current\:%8.2lf%s" \
GPRINT:d:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:d:MAX:"Maximum\: %8.2lf%s\n" \
LINE3:cdefbg#EA8F007F:"Multicast Out" \
GPRINT:e:LAST:"Current\: %8.2lf%s" \
GPRINT:e:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:e:MAX:"Maximum\:%8.2lf%s\n" \
LINE3:cdefca#FF00007F:"Unicast Out" \
GPRINT:f:LAST:" Current\:%8.2lf%s" \
GPRINT:f:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:f:MAX:"Maximum\:%8.2lf%s\n"
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title='(64-bit) bpe01.151front711 - Packets In/Out - Gi0/0/0 - Facing gi0-1-0-6.bfr01.77mowat01' \
--base=1000 \
--height=120 \
--width=750 \
--alt-autoscale \
--logarithmic \
--vertical-label='packets/sec' \
--slope-mode \
--font TITLE:8: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/html/cacti/rra/657/47788.rrd":bcast_in_hc:AVERAGE \
DEF:b="/var/www/html/cacti/rra/657/47789.rrd":mcast_in_hc:AVERAGE \
DEF:c="/var/www/html/cacti/rra/657/47790.rrd":unicast_in_hc:AVERAGE \
DEF:d="/var/www/html/cacti/rra/657/47788.rrd":bcast_out_hc:AVERAGE \
DEF:e="/var/www/html/cacti/rra/657/47789.rrd":mcast_out_hc:AVERAGE \
DEF:f="/var/www/html/cacti/rra/657/47790.rrd":unicast_out_hc:AVERAGE \
CDEF:cdefbc=d,-1,* \
CDEF:cdefbg=e,-1,* \
CDEF:cdefca=f,-1,* \
AREA:a#EACC00FF:"Broadcast In" \
GPRINT:a:LAST:" Current\:%8.2lf%s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n" \
AREA:b#EA8F00FF:"Multicast In":STACK \
GPRINT:b:LAST:" Current\:%8.2lf%s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:b:MAX:"Maximum\:%8.2lf%s\n" \
AREA:c#FF0000FF:"Unicast In":STACK \
GPRINT:c:LAST:" Current\:%8.2lf%s" \
GPRINT:c:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:c:MAX:"Maximum\:%8.2lf%s\n" \
LINE3:cdefbc#EACC007F:"Broadcast Out" \
GPRINT:d:LAST:"Current\:%8.2lf%s" \
GPRINT:d:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:d:MAX:"Maximum\: %8.2lf%s\n" \
LINE3:cdefbg#EA8F007F:"Multicast Out" \
GPRINT:e:LAST:"Current\: %8.2lf%s" \
GPRINT:e:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:e:MAX:"Maximum\:%8.2lf%s\n" \
LINE3:cdefca#FF00007F:"Unicast Out" \
GPRINT:f:LAST:" Current\:%8.2lf%s" \
GPRINT:f:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:f:MAX:"Maximum\:%8.2lf%s\n"
More information about the rrd-users
mailing list