[rrd-users] Dynamic Steps

Oliver Loch grimeton at gmx.net
Wed Apr 17 23:41:17 CEST 2013


Hi,

that's possible. In short:

I'm using a power meter that sends a signal/tick every time one watt/hour has been used. Alex then lead me to the idea that I should use a step time of one second and always write 3600 to the database when a tick arrived. Together with the ABSOLUTE counter. So if I get one tick per second the RRA will then calculate the average of the time deltas between the entries and divide the value with the calculated delta. 

So far this fits the idea and I don't need to calculate the power consumption that moment and put it into the database.

Calculating the apparent output (Scheinleistung), with "worst case" values, I get the following:

Usual breakers do 16A at 230V. Let's say the max V is 240, so the apparent output is: 240V*16A = 3840VA (3840 ticks).
Other breakers used in the Kitchen or the Bathroom do up to 32A, so the apparent output is 7680VA (7680 ticks).
And the counter itself does 230V +/- 30% (up to 299V), 240V with a maximum of 50 amperes. So I get: 240V*50A = 12000VA (12000 ticks).
The ti (time of interval) is set to 90ms in the specs, so - with a pause of 30ms per interval - there can be up to 30.000 ticks per hour.

I don't think that I will ever hit that limit. But the moment I have more than one tick per second I loose the precision with rrdtool, don't I? If there are more updates per second, then rrdtool calculates the average of the values that have been sent that second, which gives me an average of 3600 again. So even if 10800VA are utilized I end up with 3600 and the wrong information of the consumed power.

So how can I store that information into the database without "breaking" it?

One idea would be to store 3600*tick-per-second into the database?

Cu


Am 17.04.2013 um 23:09 schrieb Tobi Oetiker <tobi at oetiker.ch>:

> Oliver,
> 
> I am reading this on my phone, so I may have missed something.  but for event based logging you should use the DS type ABSOLUTE
> 
> Tobias Oetiker
> tobi at oetiker.ch
> 062 775 9902
> 
> On 17.04.2013, at 16:05, Oliver Loch <grimeton at gmx.net> wrote:
> 
>> I'm using N.
>> 
>> But if rrdtool calculates the average for that second it's wrong. E.g.:  3x3600 would be 10800 and the average 3600 again. But the value should be 10800 so that, together with the time delta, the utilized power is shown.
>> 
>> Can someone point me to docs about precision?
>> 
>> Thanks.
>> 
>> KR,
>> 
>> Oliver
>> 
>> Am 17.04.2013 um 22:44 schrieb Oliver Loch <grimeton at gmx.net>:
>> 
>>> So,
>>> 
>>> what happens if I update the database twice a second?
>>> 
>>> Cu
>>> 
>>> Am 17.04.2013 um 21:55 schrieb Tobi Oetiker <tobi at oetiker.ch>:
>>> 
>>>> no, this was not about steps, just about the accuracy of your timestamps as you run the update command.
>>>> 
>>>> Tobias Oetiker
>>>> tobi at oetiker.ch
>>>> 062 775 9902
>>>> 
>>>> On 17.04.2013, at 14:44, Oliver Loch <grimeton at gmx.net> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> So if I want steps in 0.25 seconds, I just use 14400 instead of 3600 ?
>>>>> 
>>>>> This "step thing" is really confusing sometimes.
>>>>> 
>>>>> Cu
>>> 
>>> _______________________________________________
>>> rrd-users mailing list
>>> rrd-users at lists.oetiker.ch
>>> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4343 bytes
Desc: not available
Url : http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130417/cb659204/attachment.bin 


More information about the rrd-users mailing list