[rrd-users] Re: Values at Bottom of graphics

Tobias Oetiker oetiker at ee.ethz.ch
Tue Aug 24 16:25:42 MEST 1999


Today you sent me mail regarding [rrd-users] Values at Bottom of graphics:

*> I was wondering if anyone had a sort of reference for what would be used
*> with a GPRINT statement and how to get the display into a neat format.
*> The two main problems I have is instead of generating a number like 93,
*> it's generating 93.000000 and it isn't lined up and looks really ugly :)
*> 
*> TIA,
*> Gart
*> 
*> 
*> This is the perl statement I'm using to generate the graph:

try man sprintf this explains the syntax you can use ... 

in your case it might be

%3.0lf

cheers
tobi

*> system("rrdtool graph \\
*> $FILENAME-t-day.gif --start -86400 \\
*> DEF:RUNT=$RRD:RUNT:AVERAGE \\
*> DEF:TEMP=$RRD:TEMP:AVERAGE \\
*> DEF:BATT=$RRD:BATT:AVERAGE \\
*> DEF:LOAD=$RRD:LOAD:AVERAGE \\
*> LINE1:RUNT#0000FF:\"Run Time Remaining : %lf \" \\
*> GPRINT:RUNT:MAX:%lf \\
*> LINE2:TEMP#00FF00:\"UPS Temperature\" \\
*> GPRINT:TEMP:MAX:%lf \\
*> LINE3:BATT#FF0000:\"Percent Battery Remaining\" \\
*> GPRINT:BATT:MAX:%lf \\
*> AREA:LOAD#00FFFF:\"UPS Power Load\" \\
*> GPRINT:LOAD:MAX:%lf \\
*> > /dev/null");                                                          
*> 
*> 
*> --
*> * To unsubscribe from the rrd-users mailing list, send a message with the
*>   subject: unsubscribe to rrd-users-request at list.ee.ethz.ch
*> 
*> 

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
 / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker

--
* 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