René Berber
2017-Sep-19 17:36 UTC
[Nut-upsuser] Bug or feature? polling frequency = (pollfreq + pollinterval)
Hi, Context of my question: * OS name and version, Synology's distributed Linux: Linux DS 3.10.102 #15152 SMP Fri Sep 1 11:15:03 CST 2017 x86_64 GNU/Linux * exact NUT version, Tricky... the installed tools display: $ /usr/sbin/upsd -V Network UPS Tools upsd DSM6-1-15114-170518 while the one I've compiled, and its not running, displays: $ /opt/sbin/upsd -V Network UPS Tools upsd 2.7.4 My guess is that they are the same version (Synology keeps it updated). Also... driver.version: DSM6-1-15114-170518 driver.version.data: MGE HID 1.33 * NUT installation method: Comes with Synology's DSM, and its updated by them. * UPS device name and related information Eaton 5PX 1500 * Problem description Not a problem, just an observation. I made a program to monitor my UPS, the final objective is to implement a power use totalizer, and wanted to see which polling frequency is the minimum required. Read about pollfreq, and pollinterval, but didn't see NUT's code. The values of those are: driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 5 I found that power consumption (ups.realpower) only changes every 35 seconds, which is (pollfreq + pollinterval). Does this looks correct? I would expect changes at pollfreq. Thanks. -- Ren? Berber
Charles Lepple
2017-Sep-19 23:45 UTC
[Nut-upsuser] Bug or feature? polling frequency = (pollfreq + pollinterval)
On Sep 19, 2017, at 1:36 PM, Ren? Berber <rberber at fastmail.fm> wrote:> My guess is that they are the same version (Synology keeps it updated).Is there a way to check which version they are using? (Just curious - probably will not affect the problem you described.)> Read about pollfreq, and pollinterval, but didn't see NUT's code.The usbhid-ups code is here: https://github.com/networkupstools/nut/blob/v2.7.4/drivers/usbhid-ups.c#L851-L871> The values of those are: > driver.parameter.pollfreq: 30 > driver.parameter.pollinterval: 5 > > I found that power consumption (ups.realpower) only changes every 35 > seconds, which is (pollfreq + pollinterval). > > Does this looks correct? I would expect changes at pollfreq.Since we can't control UPS latency, the polling does not have very tight timing. I would expect it to be closer to 30 seconds, though. If you run the driver with a few "-D" options, you will see a timestamp at the beginning of each line, and you should be able to follow the various Quick and Full update cycles. You could comment out some of the mapping lines in the mge_hid2nut table if you don't want to waste time reading certain values: https://github.com/networkupstools/nut/blob/v2.7.4/drivers/mge-hid.c#L1083 Note that there are some duplicates - your UPS will not have every one of those HID PDC usages (4th column).
René Berber
2017-Sep-20 01:50 UTC
[Nut-upsuser] Bug or feature? polling frequency = (pollfreq + pollinterval)
On 9/19/2017 6:45 PM, Charles Lepple wrote:> On Sep 19, 2017, at 1:36 PM, Ren? Berber wrote:>> My guess is that they are the same version (Synology keeps it updated). > > Is there a way to check which version they are using? (Just curious - probably will not affect the problem you described.)None I could find, tried strings, might try telnet but my guess is that it will spew the same modified version string. Indirectly there is a Synology forum post (https://forum.synology.com/enu/viewtopic.php?f=3&t=134961&p=498189) where this user says they are installing a very outdated (circa 2012) version. No idea how he found that out. I also tried the open source repository put out by Synology and couldn't find NUT; which is odd. -- Ren? Berber
Apparently Analagous Threads
- Bug or feature? polling frequency = (pollfreq + pollinterval)
- Bug or feature? polling frequency = (pollfreq + pollinterval)
- Bug or feature? polling frequency = (pollfreq + pollinterval)
- Eaton 5PX broken interrupt on usbhid-ups, also pollfreq vs pollinterval?
- Unable to use nut-2.7.4 with Eaton 5E1500I USB