[rrd-users] Re: Text formatting.

steve rader rader at teak.wiscnet.net
Wed Oct 6 23:02:08 MEST 1999


 > From: Chris Josephes
 > I'm trying to add information to the bottom of a RRD graph in the
 > format below.
 > 
 > Incoming   Max (.3lf) Average (.3lf)  Current (.3lf)
 > Outgoing   Max (.3lf) Average (.3lf)  Current (.3lf)

I've been meaning to investigate this for a while now... so I did
but I don't have any good news.

I tried this:

     <RRD::GRAPH ...
     AREA:in_bits#00FF00:"input "
     GPRINT:in_bits:MAX:"%3.2lf %sbits/sec max"
     GPRINT:in_bits:AVERAGE:"%3.2lf %sbits/sec ave"
     GPRINT:in_bits:LAST:"%3.2lf %sbits/sec last\n"
     LINE2:out_bits#0000FF:"output"
     GPRINT:out_bits:AVERAGE:"%3.2lf %sbits/sec ave"
     GPRINT:out_bits:MAX:"%3.2lf %sbits/sec max"
     GPRINT:out_bits:LAST:"%3.2lf %sbits/sec last\n">

and found that "%3.2lf" did *not* pad the output with
leading spaces as expected.

As a work-around I tried:

     <RRD::GRAPH ...
     AREA:in_bits#00FF00:"input "
     PRINT:in_bits:MAX:"%3.2lf %sbits/sec max"
     PRINT:in_bits:AVERAGE:"%3.2lf %sbits/sec ave"
     PRINT:in_bits:LAST:"%3.2lf %sbits/sec last\n"
     LINE2:out_bits#0000FF:"output"
     PRINT:out_bits:AVERAGE:"%3.2lf %sbits/sec ave"
     PRINT:out_bits:MAX:"%3.2lf %sbits/sec max"
     PRINT:out_bits:LAST:"%3.2lf %sbits/sec last\n">
     <PRE>
     input  <RRD::PRINT 0> <RRD::PRINT 1> <RRD::PRINT 2>
     output <RRD::PRINT 3> <RRD::PRINT 4> <RRD::PRINT 5>
     </PRE>

but I found that any <RRD::PRINT N> tag with values of N != 0 causes
the whole rrdcgi script to not work!  (Although <RRD::PRINT 0> does
print leading spaces when necessary!)

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