Page 3 of 4

Re: Calculate Min,Max Value of a measure

Posted: November 14th, 2017, 7:45 pm
by pul53dr1v3r
it's even more strange now. On manual refresh, sometimes it retrieves 0.0, sometimes the right Min value. Then, after closing AIDA (with a real Min value on the skin), it keeps the value before, after closing AIDA, even when started but resets it to 0.0 at the moment when the reg key starts to get value from AIDA and so, it keep zeroes all the time. Sometimes (on a manual refresh) it gives 0.0, sometimes a real value...

Nvm, i don't need it so much. Will go with the Max only.

A line about the average. I wished to get the average value of this sensor (PowerUsage), but that formula (in my view) is entirely for static values, not for dynamic. The formula for the dynamic values could be to read only the current values every second, then to sum the values of every second and divide with the number of the seconds of reading. For instance, reading for 5 sec would be:
42 + 87 + 300 + 50 + 71 / 5 = 110
Try to calculate this using the previous formula with min and max. O.O

Re: Calculate Min,Max Value of a measure

Posted: November 14th, 2017, 8:34 pm
by balala
Pul53dr1v3r wrote:it's even more strange now. On manual refresh, sometimes it retrieves 0.0, sometimes the right Min value. Then, after closing AIDA (with a real Min value on the skin), it keeps the value before, after closing AIDA, even when started but resets it to 0.0 at the moment when the reg key starts to get value from AIDA and so, it keep zeroes all the time. Sometimes (on a manual refresh) it gives 0.0, sometimes a real value...

Nvm, i don't need it so much. Will go with the Max only.
Because as I said I don't have installed AIDA, I think I can't do more then this. Sorry...
Pul53dr1v3r wrote:A line about the average. I wished to get the average value of this sensor (PowerUsage), but that formula (in my view) is entirely for static values, not for dynamic. The formula for the dynamic values could be to read only the current values every second, then to sum the values of every second and divide with the number of the seconds of reading. For instance, reading for 5 sec would be:
42 + 87 + 300 + 50 + 71 / 5 = 110
Try to calculate this using the previous formula with min and max. O.O
Just to clarify, because I'm not sure I understood exactly what you want. You would like to get the last five values of the [PSUPowerUsage] measure and calculate the average of these five values, or the average of the current value returned by the [PSUPowerUsage] measure and the Min and Max values?

Re: Calculate Min,Max Value of a measure

Posted: November 14th, 2017, 8:52 pm
by pul53dr1v3r
It's OK. You helped very much so far.
balala wrote:Just to clarify, because I'm not sure I understood exactly what you want. You would like to get the last five values of the [PSUPowerUsage] measure and calculate the average of these five values, or the average of the current value returned by the [PSUPowerUsage] measure and the Min and Max values?
Average Power Consumption of a session. Average Power Usage from Turning a PC on to turning it off. I just gave an example of a session that lasts 5 sec.
A session can be 1h, 10h etc... Not sure can it even be done here in rainmeter not using Lua.

Re: Calculate Min,Max Value of a measure

Posted: November 14th, 2017, 8:55 pm
by balala
Pul53dr1v3r wrote:Average Power Consumption of a session. Average Power Usage from Turning a PC on to turning it off. I just gave an example of a session that lasts 5 sec.
A session can be 1h, 10h etc... Not sure can it even be done here in rainmeter not using Lua.
I don't think so. At least I don't see a good solution now. Sorry again...

Re: Calculate Min,Max Value of a measure

Posted: November 15th, 2017, 1:35 pm
by pul53dr1v3r
if you find a way to do it, pls write.

Re: Calculate Min,Max Value of a measure

Posted: November 15th, 2017, 2:50 pm
by balala
I suppose this is the same question as this one: https://forum.rainmeter.net/viewtopic.php?p=141678#p141678
Right?

Re: Calculate Min,Max Value of a measure

Posted: November 15th, 2017, 3:39 pm
by pul53dr1v3r
balala wrote:I suppose this is the same question as this one: https://forum.rainmeter.net/viewtopic.php?p=141678#p141678
Right?
Not, it isn't. Here we talked about AVERAGE, that topic is about TOTAL consumption. The difference is like from total and average fuel consumption in a car. Even though, think the formula isn't much simpler.
For example, Total Power Consumption during a session (to a moment in the session) can be 2 000 Wh (2 kWh)
Average Power Consumption of the same session could be 80 W, 200 W etc. depending on the lasting time of the session.
Hope you got what I want?

Re: Calculate Min,Max Value of a measure

Posted: November 15th, 2017, 3:56 pm
by fonpaolo
If you're using an UPS to protect your computer, download and install the utility software from your UPS manufacturer.

You can then have all the informations you want and even more.

Re: Calculate Min,Max Value of a measure

Posted: November 15th, 2017, 4:00 pm
by balala
Pul53dr1v3r wrote:Hope you got what I want?
Yep, I did, but have no solution (yet?).

Re: Calculate Min,Max Value of a measure

Posted: November 15th, 2017, 4:44 pm
by pul53dr1v3r
fonpaolo wrote:If you're using an UPS to protect your computer, download and install the utility software from your UPS manufacturer.

You can then have all the informations you want and even more.
No, I don't . But even if I do, could bet none of theirs utilities can write the sensor values to an external file/registry.