[Nut-upsuser] NUT USB Delayed Communication

Jim Klimov jimklimov+nut at gmail.com
Tue Jan 31 16:07:23 GMT 2023


Hello,

On one hand, sorry to hear that higher polling frequency in upsmon did not
help. On another, question is if the driver gets the info (online state and
its changes) from device quickly enough.

Initially I meant for you to also try if the "pollonly" flag (in each
device section of ups.conf for usbhid-ups instances) would make a
difference?.. I'd expect data-transfer interrupts to be less laggy - but
that's as long as they work reliably or at all, which may rely on whole
chain from vendor firmware implem to chips, hubs, OS drivers, powersaving
and whatnot. And everyone cuts corners.

Running the drivers in debug mode can expose the events and state changes:
stop their services, run `usbhid-ups -a vdn-ups01 -DDDDDD`, watch console
as you pull the plug and put it back.

Also current NUT (master certainly, 2.8.0 release maybe) should try harder
to reconnect upon problems. Possibly an upgrade would address your
ling-term stability issues.

Jim

PS: returning discussion to mailing list :)



On Tue, Jan 31, 2023, 16:07 jack Bamford <jack at violetdragonsnetwork.co.uk>
wrote:

> Hi,
>
> I am still having problems with NUT, it stops communication completely
> after a few days of uptime, however I have messed with Polfreg and
> Polintervals but none makes no difference, if i restart nut-server it shows
> it looses communication between the UPS then connects again however pulling
> the plug it does not detect that the UPS is on battery, I have tried on
> multiple systems, pfSense, Debian on a Raspberry Pi and on a old Laptop and
> same problem occurs.
>
> Any ideas?
>
> Regards
>
> Jack
> On 08/01/2023 01:33, Jim Klimov wrote:
>
> Given this mentioned APC, I assume usbhid-ups. It should support those
> options via ups.conf sections.
>
> Also, `upsmon` client may be strobed by POLLFREQ setting to talk to upsd
> more pr less intensively, but by default it is 5s (check if distro did
> differently?)
>
> Are you using distro-packaged NUT (likely old 2.7.4 then), or 2.8.0+ -
> maybe custom build from github?
>
> Jim Klimov
>
> On Sat, Jan 7, 2023, 23:38 jack Bamford <jack at violetdragonsnetwork.co.uk>
> wrote:
>
>> Hi,
>>
>> Thanks for your reply,
>>
>> On Server side i don't have have pollonly or interrupts. What you
>> recommend to try?
>>
>> Regards
>>
>> Jack
>> On 07/01/2023 22:33, Jim Klimov wrote:
>>
>> I would guess configuration of `pollonly` vs. interrupts (lack of
>> pollonly) can play a difference - at least worth trying. Different HW
>> (mis-)behaves differently with these option, no "one to rule them all".
>>
>> Jim
>>
>>
>> On Sat, Jan 7, 2023, 20:44 jack Bamford via Nut-upsuser <
>> nut-upsuser at alioth-lists.debian.net> wrote:
>>
>>> Good evening folks,
>>>
>>> So I configured NUT on a Raspberry Pi 4 both UPS are connected over USB
>>> however the switch from AC Power to Battery seems to be delayed on the
>>> NUT communication would anyone have any ideas? The Pi Reports that the
>>> UPS is on battery around 30 seconds later I think this delay is long. I
>>> have tested it on a physical computer and the detection is around 5 to 6
>>> seconds with the communication from the UPS to the machine. I have
>>> tested both USB 2 and 3 Ports but same problem
>>>
>>> Specs of Pi
>>>
>>> Raspberry Pi4
>>>
>>> Debian Raspbian
>>>
>>> 32GB Sandisk SSD
>>>
>>> POE Hat
>>>
>>> Both UPS's are APC Smart 1000 non Display
>>>
>>> Regards
>>>
>>> Jack
>>>
>>> --
>>> VioletDragons Network
>>> VioletDragons Projects
>>> Violets Data Center
>>> Malvern
>>> United Kingdom
>>> Phone:  +44(0)7413 601663
>>> Email: jack at violetdragonsnetwork.co.uk
>>> Website: www.violetdragonsnetwork.co.uk
>>>
>>>
>>> _______________________________________________
>>> Nut-upsuser mailing list
>>> Nut-upsuser at alioth-lists.debian.net
>>> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>>>
>> --
>> VioletDragons Network
>> VioletDragons Projects
>> Violets Data Center
>> Malvern
>> United Kingdom
>> Phone:  +44(0)7413 601663
>> Email: jack at violetdragonsnetwork.co.uk
>> Website: www.violetdragonsnetwork.co.uk
>>
>> --
> VioletDragons Network
> VioletDragons Projects
> Violets Data Center
> Malvern
> United Kingdom
> Phone:  +44(0)7413 601663
> Email: jack at violetdragonsnetwork.co.uk
> Website: www.violetdragonsnetwork.co.uk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20230131/410753d7/attachment.htm>


More information about the Nut-upsuser mailing list