[rrd-users] Cumulative Moving Average
Alex van den Bogaerdt
alex at vandenbogaerdt.nl
Wed Mar 20 00:24:01 CET 2013
First a warning: RRDtool does not _store_ values. Everything you put in is
subject to normalization and consolidation. You can make those no-ops if you
are careful. Make sure you understand normalization and consolidation
before moving on; maybe RRDtool is not the right tool for you.
This said: it seems to me like you already have some computed averages (from
whichever source, could be RRDtool itself) and store those averages. In
that case you already have a rate, and want to store the rate => GAUGE.
And then you ask for "must be kept over an unlimited amount of time". That's
a red flag for RRDtool. RRDtool will, by design, store a limited amount of
rates. Think of a wheel with spokes. At the end of every spoke your rates
will be stored, the wheel will turn one spoke, and is ready to receive the
next rate. At some point the original first spoke will be used again to
store the newest rate, overwriting the old rate at that position.
Again: this said: no system will be able to store unlimited amounts of data.
So whatever tool you use, there will be some limit, so maybe you can come up
with a practical limit which is good enough for your purposes.
----- Original Message -----
From: "anylrs1" <anylrs1 at gmail.com>
To: "Steve Shipway" <s.shipway at auckland.ac.nz>
Cc: <rrd-users at lists.oetiker.ch>
Sent: Tuesday, March 19, 2013 8:54 AM
Subject: Re: [rrd-users] Cumulative Moving Average
> Thanks but what I was looking for is a way to store the average in the
> not extracting it.
> I thought maybe it would be possible to combine a rrdfetch with every
> rrdupdate in some way?
> On Tue, Mar 19, 2013 at 7:08 AM, Steve Shipway
> <s.shipway at auckland.ac.nz>wrote:
>> You can use TREND and TRENDNAN to extract a sliding-window average over
>> a specific sized window. This is probably what you want?
>> You may also be able to use a cunningly-designed CDEF to make a decayed
>> average over the currently visible time window, and then take a VDEF over
>> that to get the last value for display.
>> *Steve Shipway*
>> University of Auckland ITS
>> *UNIX Systems Design Lead*
>> s.shipway at auckland.ac.nz
>> Ph: +64 9 373 7599 ext 86487
>> rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch[rrd-users-bounces+s.shipway=
>> auckland.ac.nz at lists.oetiker.ch] on behalf of anylrs1 [anylrs1 at gmail.com]
>> *Sent:* Monday, 18 March 2013 11:52 p.m.
>> *To:* rrd-users at lists.oetiker.ch
>> *Subject:* [rrd-users] Cumulative Moving Average
>> Hi All,
>> I'm new to rrdtool and trying to figure out if I can use it for my needs.
>> I need to store a cumulative moving average in file.
>> The average will be updated from a counter every 5 minutes.
>> The cumulative average must be kept over an unlimited amount of time. (A
>> reset will be done manually at the user's discretion).
>> Is there a way to do this with rrdtool?
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
More information about the rrd-users