[rrd-users] Re: CDEF - creating a increasing series

Alex van den Bogaerdt alex at ergens.op.het.net
Tue Sep 7 11:34:32 MEST 2004


On Tue, Sep 07, 2004 at 10:17:58AM +0200, Lars Rune Bjørnevik wrote:

> Actually, this is an uptime display for a web server - not a trafficcounter... ;-)
> When I query the web, I get 1=up, 0=down
> A sum of this responce, divided by a sum of "ones" gives the uptime!

???

So, if the series is 1,1,1,0 then you get:

   sum of response:  1+1+1+0 = 3
   sum of "ones":    1+1+1   = 3
   division:         3/3 = 1.00  == 100% uptime

I do:

   DEF:ones_and_zeros=/path/to/my.....
   CDEF:uptime=ones_and_zeros,100,*
   PRINT:uptime,"%6.2lf %%"

and end up with 75.00 %


Alex
-- 
I ask you to respect any "Reply-To" and "Mail-Follow-Up" headers.  If
you reply to me off-list, you'd better tell me you're doing so.  If
you don't, and if I reply to the list, that's your problem, not mine.

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