GPRINT Formatting Problem

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

Moderators: Developers, Moderators

Post Reply
simcen
Posts: 10
Joined: Fri Jan 12, 2007 5:16 pm

GPRINT Formatting Problem

Post by simcen »

Hi There again :)

As you can see in the attached picutre, the last GRPINT line (mct50a72_11) does not look as the other ones.

Here is the rrd command for the graph copied from graph debug mode in cacti:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="MCT Load Average" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="percentage" \
--slope-mode \
DEF:a="/var/www/cacti-0.8.6i/rra/local_machine_cpu_58_100.rrd":cpu_58:AVERAGE \
DEF:b="/var/www/cacti-0.8.6i/rra/local_machine_cpu_58_100.rrd":cpu_10:AVERAGE \
DEF:c="/var/www/cacti-0.8.6i/rra/local_machine_cpu_58_100.rrd":cpu_11:AVERAGE \
LINE1:a#F51D30:"mct50a72_8"  \
GPRINT:a:LAST:" Current\:%8.2lf"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf"  \
GPRINT:a:MAX:"Max\:%8.2lf %s\n"  \
LINE1:b#A150AA:"mct50a72_10"  \
GPRINT:b:LAST:"Current\:%8.2lf"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf"  \
GPRINT:b:MAX:"Max\:%8.2lf %s\n"  \
LINE1:c#74C366:"mct50a72_11"  \
GPRINT:c:LAST:"Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:c:MAX:"Max\:%8.2lf %s" 
Does anybody know why the strings are not formatted well?

Thanks for help in advance!

Regards,
Simon
Attachments
mct_daily.png
mct_daily.png (53.53 KiB) Viewed 523 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

No, RRDtool is a bit finiky sometimes. I would create a GPRINT preset that uses less spaces in front of the number to compress things a bit and see if that helps.

Also, what version of RRDtool are you using.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests