[Nut-upsuser] Belkin Regulator Pro dropping connection and halting

Arnaud Quette aquette.dev at gmail.com
Thu Dec 2 08:33:34 UTC 2010


2010/12/1 John Bayly <freebsd.ports at tipstrade.net>

> On 01/12/2010 14:17, Arjen de Korte wrote:
>
>> Citeren Charles Lepple <clepple at gmail.com>:
>>
>>  The get_belkin_reply() function looks fragile to me. Three seconds should
>>> be
>>> enough to fill the buffer, but if you put a few upsdebugx() calls around
>>> ser_get_buf_len(), it should be evident whether the read is timing out, or
>>> if there is a problem with the format of the response.
>>>
>>
>> Starting with
>>
>>    ser_flush_io(upsfd);
>>
> Thanks for the suggestions, I've added the flush statement as well as some
> debugging information. As this is a intermittent issue I decided to try
> overloading the UPS by sending it repeated beeper commands while watching
> the debug output. What appears to happen is that the UPS returns an unknown
> "~00R000" response. This means get_belkin_reply() returns -1, causing a
> datastale state is set when called from do_status().


you should remove the datastale() call since upsd will automatically flag
the device as stalled if it has failed to update its data for 15 seconds
(default of MAXAGE).

cheers,
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20101202/48d85ca1/attachment-0001.htm>


More information about the Nut-upsuser mailing list