[rrd-users] Re: Text formatting.

steve rader rader at teak.wiscnet.net
Thu Oct 7 19:40:56 MEST 1999


 > From: Chris Josephes
 > push(@args,"DEF:in=$rf:ds0:AVERAGE","DEF:out=$rf:ds1:AVERAGE");
 > push(@args,"AREA:in".$Color{"in"}.":".$Legend{"in"});
 > push(@args,"GPRINT:in:MAX:Max \\: %.3lf %s");
 > push(@args,"GPRINT:in:AVERAGE:Average \\: %.3lf %s");
 > push(@args,"GPRINT:in:LAST:Current \\: %.3lf %s\\n");
 > push(@args,"LINE1:out".$Color{"out"}.":".$Legend{"out"});
 > push(@args,"GPRINT:out:MAX:Max \\: %.3lf %s");
 > push(@args,"GPRINT:out:AVERAGE:Average \\: %.3lf %s");
 > push(@args,"GPRINT:out:LAST:Current \\: %.3lf %s");
 > push(@args,"COMMENT: Last updated $time");
 > RRDs::graph @args;

You missed Alex's point: use " %3.3lf" instead of " %.3lf".

For example

 push(@args,"GPRINT:in:MAX:Max \\: %3.3lf %s");

See also man 3 printf, sorta.

later
steve
- - -
systems guy
wiscnet.net

--
* To unsubscribe from the rrd-users mailing list, send a message with the
  subject: unsubscribe to rrd-users-request at list.ee.ethz.ch



More information about the rrd-users mailing list