I can't seem to get my GPRINT value left justified, it's always far off to the right.. I have attached an example picture of my graph. Any suggestions would be much appreciated.. I'd like the output to be like:
Input: <ip addr> Current: <value>
instead it's printing: the Current: <value> underneath the "input: <ip addr>"
What gives?
GPRINT/Text formatting
Moderators: Developers, Moderators
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1110477423 \
--end=1110563823 \
--title="Aggregate Bandwidth" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2005/03/10 09:57:03 To 2005/03/11 09:57:03\c" \
COMMENT:"\n" \
--vertical-label="bits per sec" \
DEF:a="/var/www/cacti/rra/ds0020_traffic_in_10.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/cacti/rra/ds0021_traffic_in_20.rrd":traffic_in:AVERAGE \
DEF:c="/var/www/cacti/rra/ds0022_traffic_in_26.rrd":traffic_in:AVERAGE \
DEF:d="/var/www/cacti/rra/ds0020_traffic_in_10.rrd":traffic_out:AVERAGE \
DEF:e="/var/www/cacti/rra/ds0021_traffic_in_20.rrd":traffic_out:AVERAGE \
DEF:f="/var/www/cacti/rra/ds0022_traffic_in_26.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefd=b,8,* \
CDEF:cdefg=c,8,* \
CDEF:cdefj=d,8,* \
CDEF:cdefbc=e,8,* \
CDEF:cdefbf=f,8,* \
CDEF:cdefbi=TIME,1110563538,GT,a,a,UN,0,a,IF,IF,TIME,1110563538,GT,b,b,UN,0,b,IF,IF,TIME,1110563538,GT,c,c,UN,0,c,IF,IF,TIME,1110563538,GT,d,d,UN,0,d,IF,IF,TIME,1110563538,GT,e,e,UN,0,e,IF,IF,TIME,1110563538,GT,f,f,UN,0,f,IF,IF,+,+,+,+,+,8,* \
AREA:cdefa#00FF00:"Input\: x.x.x.xxx" \
GPRINT:cdefa:LAST:" Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefd#00CF00:"Input\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777219" \
GPRINT:cdefd:LAST:" Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefg#00A348:"Input\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777220" \
GPRINT:cdefg:LAST:" Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefj#4668E4:"Output\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777220" \
GPRINT:cdefj:LAST:"Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefbc#0000FF:"Output\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777219" \
GPRINT:cdefbc:LAST:"Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefbf#3D168B:"Output\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777220" \
GPRINT:cdefbf:LAST:"Current\:%8.2lf%s" \
COMMENT:"\n" \
LINE1:cdefbi#FF0000:"Total Bandwith\:" \
GPRINT:cdefbi:LAST:" Current\:%8.2lf%s"
Looks like the problem is all the white space in the GPRINT lines between the LAST:" and Current:" (you cannot see what I'm talking about in the forum because it strips the whitespace out). Where would I remove this whitespace? This is from a graph template I downloaded in xml format..
--imgformat=PNG \
--start=1110477423 \
--end=1110563823 \
--title="Aggregate Bandwidth" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2005/03/10 09:57:03 To 2005/03/11 09:57:03\c" \
COMMENT:"\n" \
--vertical-label="bits per sec" \
DEF:a="/var/www/cacti/rra/ds0020_traffic_in_10.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/cacti/rra/ds0021_traffic_in_20.rrd":traffic_in:AVERAGE \
DEF:c="/var/www/cacti/rra/ds0022_traffic_in_26.rrd":traffic_in:AVERAGE \
DEF:d="/var/www/cacti/rra/ds0020_traffic_in_10.rrd":traffic_out:AVERAGE \
DEF:e="/var/www/cacti/rra/ds0021_traffic_in_20.rrd":traffic_out:AVERAGE \
DEF:f="/var/www/cacti/rra/ds0022_traffic_in_26.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefd=b,8,* \
CDEF:cdefg=c,8,* \
CDEF:cdefj=d,8,* \
CDEF:cdefbc=e,8,* \
CDEF:cdefbf=f,8,* \
CDEF:cdefbi=TIME,1110563538,GT,a,a,UN,0,a,IF,IF,TIME,1110563538,GT,b,b,UN,0,b,IF,IF,TIME,1110563538,GT,c,c,UN,0,c,IF,IF,TIME,1110563538,GT,d,d,UN,0,d,IF,IF,TIME,1110563538,GT,e,e,UN,0,e,IF,IF,TIME,1110563538,GT,f,f,UN,0,f,IF,IF,+,+,+,+,+,8,* \
AREA:cdefa#00FF00:"Input\: x.x.x.xxx" \
GPRINT:cdefa:LAST:" Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefd#00CF00:"Input\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777219" \
GPRINT:cdefd:LAST:" Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefg#00A348:"Input\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777220" \
GPRINT:cdefg:LAST:" Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefj#4668E4:"Output\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777220" \
GPRINT:cdefj:LAST:"Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefbc#0000FF:"Output\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777219" \
GPRINT:cdefbc:LAST:"Current\:%8.2lf%s" \
COMMENT:"\n" \
STACK:cdefbf#3D168B:"Output\: x.x.x.xxx - Broadcom NetXtreme Gigabit Ethernet Driver - 16777220" \
GPRINT:cdefbf:LAST:"Current\:%8.2lf%s" \
COMMENT:"\n" \
LINE1:cdefbi#FF0000:"Total Bandwith\:" \
GPRINT:cdefbi:LAST:" Current\:%8.2lf%s"
Looks like the problem is all the white space in the GPRINT lines between the LAST:" and Current:" (you cannot see what I'm talking about in the forum because it strips the whitespace out). Where would I remove this whitespace? This is from a graph template I downloaded in xml format..
Who is online
Users browsing this forum: No registered users and 1 guest