[Nut-upsuser] Plea for a more loquacious nut [short power events]

Charles Lepple clepple at gmail.com
Sat Dec 7 19:43:53 UTC 2013


On Dec 7, 2013, at 12:06 AM, Kris Jordan wrote:

> apcsmart quick power cuts @  20 & 30
> usbhid-ups @ 30 & 40
> 
> The APC unit logs alert_handler: OB. usbhid-ups isn't so obvious, so I'm not sure.

$ grep send_to_all usbhid-ups.log|grep ups.status 
  10.538414	send_to_all: SETINFO ups.status "OL CHRG"
  30.912005	send_to_all: SETINFO ups.status "OB DISCHRG"
  32.585047	send_to_all: SETINFO ups.status "OL CHRG"
  40.667472	send_to_all: SETINFO ups.status "OB DISCHRG"
  43.223281	send_to_all: SETINFO ups.status "OL CHRG"

> At least the apcsmart driver is reacting immediately, but upsmon reports nothing unless I cut power long enough. upsmond has noticed quick power cut, but I think that's because It happened at the same time as the normal check interval. I'm using defaults here, as far as poll intervals.
> 
> Maybe upsd is getting the message, does it push upsmon?

Good point. It's polling, at a default interval of 5 seconds:

https://github.com/networkupstools/nut/blob/v2.7.1/clients/upsmon.c#L2010

Adding something like the IMAP IDLE command to the NUT protocol should enable pushing messages, but would require the client polling loops to be reworked. In the short term, decreasing the upsmon.conf POLLFREQ and POLLFREQALERT settings should catch the shorter events.

> I thought to try upsd at full debugging to see if it says anything, but it appears that nothing special is shown for UPS/driver events.

I added the upsd case to https://github.com/networkupstools/nut/issues/79

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list