[rrd-users] Re: printing last update and last values in web pages via rrdcgi?

steve rader rader at teak.wiscnet.net
Tue Sep 28 22:21:31 MEST 1999

 > *> Like Bryce as root <root at zen.ics.uwe.ac.uk> asked the other day,
 > *> can rrdcgi to generate *HTML* like the following?  If so, how?
 > *> 
 > *>  The statistics were last updated <B>Tuesday, 28 Sep 1999 at 13:25</B>
 > *>  [...]
 > *>  <TD ALIGN=right>
 > *>    <SMALL>Average<FONT COLOR=#00cc00>&nbsp;In:</FONT></SMALL>
 > *>  </TD>
 > *>  <TD ALIGN=right>
 > *>    <SMALL>1012.1 kbits/s</SMALL>
 > *>  </TD>
 > From: Tobias Oetiker
 > sure ... jsut replace GPRINT by PRINT

Well, I tried that of course!  It doesn't work.  So I glanced
at the Source and, quite by accident, found that the following

 <RRD::PRINT DEF:myspeed=test.rrd:speed:AVERAGE
   PRINT:realspeed:AVERAGE:"ave %.2lf %Sb/s">

Then, on a hunch, I tried

 <RRD::GRAPH test.gif
  DEF:myspeed=test.rrd:speed:AVERAGE CDEF:realspeed=myspeed,1000,*
  PRINT:realspeed:AVERAGE:"ave %.2lf %Sb/s"
 <RRD::PRINT realspeed>

which also works.

The doc for the rrdcgi <RRD::PRINT> tag is, with all due respect
(to the RRDtool guru), simply not in sync with reality.  Perhaps it
should read

 RRD::PRINT vname

 If the preceding RRD::GRAPH tag contained one or more PRINT
 arguments, then you can use this tag to print the output of 
 the PRINT argument for the variable named "vname".

- - -
systems guy

* 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