Comment align problem

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

Moderators: Developers, Moderators

Post Reply
docwalez
Posts: 4
Joined: Wed Oct 21, 2009 8:45 am

Comment align problem

Post by docwalez »

Hi there,

i don't understand why the comment line(Test:) don't align with my other lines. I've created an example that shows up this issue. Each line has the same row number/titles (Name: Current: Average: Maximum). The only way to get this aligned was adding some whitespaces behind the comment line but this can't be the solution, i think ;)

Some info about my System:
RRDTool 1.3.8-1 with Cacti 0.8.7e-1 on Debian.
Font is taken directly from Fontconfig, a strace gives me
"/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf" as used font.

rrdtool cmd:

/usr/bin/rrdtool graph - --imgformat=PNG --start=-86400 --end=-300 --title="Localhost - Memory Usage" --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="kilobytes" --slope-mode --font TITLE:12: --font AXIS:8: --font LEGEND:9: --font UNIT:8: DEF:a="/var/lib/cacti/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE DEF:b="/var/lib/cacti/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE CDEF:cdefa=a,1024,* CDEF:cdefe=b,1024,* AREA:cdefa#FF4105FF:"Free" GPRINT:cdefa:LAST:"Current\:%8.2lf %s" GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" AREA:cdefe#FFC73BFF:"Swap":STACK GPRINT:cdefe:LAST:"Current\:%8.2lf %s" GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" COMMENT:"Test\:" GPRINT:a:LAST:"Current\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\:%8.2lf %s" GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"


Cheers,
docwalez
Attachments
example.png
example.png (22.78 KiB) Viewed 1692 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

There is not a graphed item associated with Test:, thus its offset from the rest. Try adding a few spaces before Test: in the graph template.
docwalez
Posts: 4
Joined: Wed Oct 21, 2009 8:45 am

Post by docwalez »

BSOD2600 wrote:There is not a graphed item associated with Test:, thus its offset from the rest. Try adding a few spaces before Test: in the graph template.
Hello BSOD2600,
thank's for your reply. I'm confused cause "Test:" has an association with [mem_buffers] in the graph template as shown on the screenshot. So, is the only suitable solution adding spaces bevor/after "Test:" COMMENT line ?


Greets,
Docwalez
Attachments
cacti2.jpeg
cacti2.jpeg (118.19 KiB) Viewed 1662 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

"Test:" is not a graph type of area or line, thus no colored box before the text.

Yes, you'll need to add some spaces before the text to help with the alignment.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests