[rrd-users] question for an "average counter" rrd

Matthias Lemke m at box.li
Sat Feb 23 15:32:33 CET 2013



On 23.02.2013 15:14, Alex van den Bogaerdt wrote:
>> I habe a pellet oven with webinterface (austrian ETA). The webinterface
>> works perfect. I can read and set most of the values.
>>
>> Two of the values are counter:
>> - pelles in kg
>> - working time in seconds
>>
>> I put the pellets in kg in a counter rrd. So I can see for instance
>> pellets/day vs. outside temperature.
> 
> Internally RRDtool will compute and store the number of kilograms per 
> second.
> 

Yes right, I multiply with 86400 ...

>> Now I am interested in the value of pellets per year. My imagination
>> would be a gliding yearly average (every day the rrd will be updatet
>> with the pellets of the last 365 days).
> 
> Don't update like this. Just keep updating the RRD as usual.

I do this since more than a year.

> Then display 365 days in a graph of 365 pixels wide.
> 
> Each pixel column will show the average number of kilograms per second 
> during that day.

right.

> 
> If you print the average of those 365 values in your graph, you have the 
> average number of kilograms per day measured over an entire year.

puh, how can I do this?

> 
> A year is 365 times 24 times 60 times 60 seconds. That is 31536000 seconds. 
> Just multiply the rate you already have in your RRD by 31536000, and then 
> compute the average. The outcome will be the number of kilograms during the 
> past 365 days, which is the sliding window you want.

Here I need also a hint or help how I can do this...

> 
> One small problem is that for RRDtool a day starts and ends at midnight UTC, 
> which is close but not equal to your time. I don't think this should be 
> relevant, even if you would live at the other side of the globe.

not relevant, right.

> 
> The other small problem is that you count kilograms, not pellets. This you 
> could solve by another multiplication in your CDEF, number of pellets per 
> kilogram. 

my fault, I am interested furhtermore in kg of pellets.
counting pellets is on the way to counting sand :)


thanks and regards

> 
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
> 



More information about the rrd-users mailing list