[rrd-users] Re: CDEF - creating a increasing series
ciaran deignan
ciaran.deignan at netcelo.com
Tue Sep 7 10:48:25 MEST 2004
Lars Rune Bjørnevik wrote:
>Thanks a million!
>It works perfect!
>
>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!
>
Actually I was using this technique to calculate uptime, but I stopped,
probably
because I still don't understand steps and pixel sizes (Alex's
explanation makes
my eyes water...)
Anyhow, my RRD object contains a "time since last ping", and I calculate
uptime
using "Average"...
Here (0 <= PingTime <= 361) - undef means the ping-ing process was absent...
DEF:delay=$rrdfile:PingTime:AVERAGE
CDEF:invalid=delay,UN
CDEF:pin=invalid,100,*
CDEF:up=delay,360,LE
CDEF:pup=up,100,*
CDEF:down=delay,360,GE
CDEF:pdown=down,100,*
CDEF:ping=down,UNKN,delay,IF
LINE3:ping#0000ff:"Response Time"
COMMENT:\s
GPRINT:pup:AVERAGE:"Up %2.1lf%%"
GPRINT:pdown:AVERAGE:"Down %2.1lf%%"
GPRINT:pin:AVERAGE:"Untested %2.1lf%%"\r
hope this helps
Ciaran
--
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