[rrd-users] Re: GPRINT & CGI

Alex van den Bogaerdt alex at slot.hollandcasino.nl
Mon Mar 5 21:04:27 MET 2001


Dan McGinn-Combs wrote:
> 
> 
> I am a bit confused about the values used for GPRINT and PRINT. Since there
> is a "cf" involved, I expected that they would be a calculated value, say an
> average. I would like to consolidate the average mail delivery time for
> three locations and consolidate them into a single number (the current
> average mail delivery time for that location - UK for instance). Given that
> is my goal, is this the right way to get that number?
> 
> DEF:STDTime=STD.rrd:Elapsed:AVERAGE
> DEF:HWYTime=HWY.rrd:Elapsed:AVERAGE
> DEF:BRSTime=BRS.rrd:Elapsed:AVERAGE
> CDEF:UKAvg=STDTime, HWYTime, BRSTime,3,/
> GPRINT:UKAvg:AVERAGE:"Average Time \: %3.0lf"

No, its not. 

You are doing print( average(x)+average(y)+average(z) ) and this isn't
going to work (but it will work in the next release!).

However, to the best of my knowledge you can print( average(x+y+z) )
and get the same result provided that all time ranges are equal.

> The second question is regarding the CGI functions. I would like to provide
> a map for my uses. When they roll their mouse across the UK or Europe or New
> Zealand, I would like the tooltip to show the Gprint calculated above. So
> the question is, how do I get that information from RRDTool and onto my html
> page dynamically, preferably as mouseover fires, but alternatively whenever
> they load/refresh the index.html page.

I do recall something similar to this (clickable images) so it's probably
best to check the contrib dir.

cheers,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list