[rrd-users] Re: New operator to CDEF proposal

Glenn MacGregor gtm at highstreetnetworks.com
Wed Jan 22 22:49:19 MET 2003


That would be true if we were gareented that the time the samples are taken
are all equal distances.  We still need to account for unknown samples.

Here is a better explanation (example)
Time        Value
0                1
5                1
9                0
20              1

We need to make some assumptions here, between 5 and 9 somewhere the value
changed to 0 could have been right after we polled at 5 or right before we
poll at 9.  So I assume that it is at 7 ((9-5)/2) + 5 (middle).  Same with
the 9 to 20 case so I assume it is 14.5.

So the value is 1 from 0 to 7 and 14.5 to 20, total time it is 1 = 12.5 of
the 20.  Total time it was 0 is 7.5. The calulation would be
(20 - 7.5)/20 = .625  ==> Total up percentage is 62.5%

----- Original Message -----
From: "Gonzalo Arana" <garana at uolsinectis.com.ar>
To: "Glenn MacGregor" <gtm at highstreetnetworks.com>
Sent: Wednesday, January 22, 2003 4:29 PM
Subject: Re: [rrd-users] New operator to CDEF proposal


>
> mmm...
>
> that's equal to (apart from diferences due to finite numerical
> precision):
>
> #TrueSamples/#TotalSamples
>
> #TrueSamples: can be obtained via CDEF: (sum over all values).
> #TotalSamples: yo know it since you built rrd.
>
> Note: you may only graph rra, NOT rrd.
>
> Hope it helps,
>
> On Wed, 2003-01-22 at 14:00, Glenn MacGregor wrote:
> > Hi All,
> >
> > I have not been using rrdtool for too long, so this maybe unnecessary,
if so tell me know how I can do it with the existing operators.
> >
> >
> > I am trying to calculate availability for a device based on a true or
false value.  The availability is a percentage 0 - 100%.  The only way I can
think of to calculate it would be:
> >
> > ((Total # samples * (endtime - starttime)) - (# of false samples *
(endtime - starttime)) / (Total # samples * (endtime - starttime))) * 100
> >
> > Example:
> > Ten samples every 5 minutes
> > Time        Value        Availability        Function
> > ---------    -----------        --------------        --------------
> > 0                1                100%
((1*(0-0))-(0*(0-0))/(1*(0-0))*100               (Could be a problem here
Div by 0)
> > 5                1                100%          ((2*(5-0))-0/2*(5-0)*100
= 100
> > 10              1                100%
> > 15              1                100%
> > 20              0                80%            (5*20)-(1*20)/(5*20) =
80/100 = .8 * 100 = 80%
> > 25              1                83.3%
> > 30              0                71.4%
> > 35              0                62.5%
> > 40              1                66.7%
> > 45              1                70.0%
> > 50              0                63.7%
> >
> >
> >
> > Is there a way to do this in the current CDEF?  If not I can add it to
the list of functions if you think this is the correct way to do something
like this?
> >
> > Or is there another way to make this happen within rrd?
> >
> >
> > Thanks in advance
> >
> >         Glenn MacGregor
> > --
> > 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
> >
> >
> --
> Gonzalo Arana
> Ingenieria de Portal
> UOLSinectis
>
> Florida 537 Piso 6, Buenos Aires, Argentina
> +54-11-4321-9110 ext 2543
> http://www.uolsinectis.com.ar/
>
>
>

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