Total Bandwith broken?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
fgk
Posts: 5
Joined: Wed Mar 22, 2006 3:17 pm

Total Bandwith broken?

Post by fgk »

Hello,

I recently notices that all our graphs do only show total bandwith for one direction (see screenshot).

After a bit of debugging I discovered the reason:

rrdtool (1.2.11-0.5) does not print the comment when it contains "\n" (new line).


When I run rrdtool manually obmitting the \n the comments gets printed correctly (withut new line, of course).

Is this a known issue?
What can be done?

Cacti is configured for rrdtool 1.2 .
Attachments
graph_image.png
graph_image.png (32.83 KiB) Viewed 1480 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Total Bandwith broken?

Post by gandalf »

fgk wrote:rrdtool (1.2.11-0.5) does not print the comment when it contains "\n" (new line).
...
Cacti is configured for rrdtool 1.2 .
Hmm ... And Settings->Paths is set correctly? Would bet this is a version issue if you had not already verified this. Please click on the wrench next to the graph and post the whole rrdtool graph statement
Reinhard
fgk
Posts: 5
Joined: Wed Mar 22, 2006 3:17 pm

Post by fgk »

Thanks for your reply.


It's a rrdtools issue, I tested it manually on the command line.

rrdtool cuts the comment if it contains \n .


The following graph has been creating with this command line:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="3com5 - Traffic - RMON Port 08 on/108" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_in:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total In\: 576.23 MB\n" \
LINE1:cdeff#002A97:"Outbound" \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"Total Out\: 547.38 MB"

http://traffic.velia.net/test.png


When I obmit the \n, everything works fine:
/usr/bin/rrdtool graph - --imgformat=PNG --start=-86400 --end=-300 --title="3com5 - Traffic - RMON Port 08 on/108" --rigid --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="bits per second" --slope-mode DEF:a="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_in:AVERAGE DEF:b="/usr/share/cacti/site/rra/3com5_traffic_in_288.rrd":traffic_out:AVERAGE CDEF:cdefa=a,8,* CDEF:cdeff=b,8,* AREA:cdefa#00CF00:"Inbound" GPRINT:cdefa:LAST:" Current\:%8.2lf %s" GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s" COMMENT:"Total In\: 576.23 MB" LINE1:cdeff#002A97:"Outbound" GPRINT:cdeff:LAST:"Current\:%8.2lf %s" GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s" COMMENT:"Total Out\: 547.38 MB" > /var/www/traffic.velia.net/test2.png

http://traffic.velia.net/test2.png
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I've seen this on a few of my graphs too. Decreasing the font size or increasing the graph width so all the text shows is another option.

Probably a rrdtool bug.
fgk
Posts: 5
Joined: Wed Mar 22, 2006 3:17 pm

Post by fgk »

Hello BSOD2600,


you were right.

After I changed the rrdtools font to something smaller, rrdtools manages to print the comment.

Should this considered to be a rrdtool bug?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

I believe so since when you manually tested the graph command outside cacti w/o the \n, it worked. With the \n the graph is broken, right? Sounds like a bug to me. Post the bug details on the rrdtool tracker.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests