# [rrd-users] Re: Calculation of 30min, 2hours and 1day average samples

Cody Lo cody at hkcable.com
Thu Jun 5 11:23:14 MEST 2003

```Thanks Alex.

So, as my understanding, 30min average sample is the average of a specific set of "six 5min samples" ? And the 2hours average sample is the average of a specific set of "4 30min samples" and so on for the rest ?

Just want to clarify cus' my English is not good.

Thanks again.

Regards,
Cody

-----Original Message-----
From: Alex van den Bogaerdt [mailto:alex at ergens.op.het.net]
Sent: Thursday, June 05, 2003 5:12 PM
To: rrd-users at list.ee.ethz.ch
Subject: [rrd-users] Re: Calculation of 30min, 2hours and 1day average samples

On Thu, Jun 05, 2003 at 04:54:32PM +0800, Cody Lo wrote:

> I expect the 30min sample is the sum of the past six 5min samples and divide by 6.

No, not the last.

30-minute samples define the interval from hh:00 to hh:30 and hh:30 to (hh+1):00
so they must be built from specific 5-minute intervals, not semi-random intervals
such as "the past six".

And yes, averages can be averaged into a longer interval:

300*10 + 300*20 + 300*30 + 300*40 + 300*50 + 300*60
= 300*(10+20+30+40+50+60)
= 300*6  * ((10+20+30+40+50+60)/6)
= 1800 * 35

HTH
Alex
--
Much of what looks like rudeness in hacker circles is not intended to give
offence. Rather, it's the product of the direct, cut-through-the-bullshit
communications style that is natural to people who are more concerned about
solving problems than making others feel warm and fuzzy.

http://www.tuxedo.org/~esr/faqs/smart-questions.html

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