[Nut-upsuser] mge-shut driver fails almost after every reboot
Panagiotis Kritikakos
panagiotis.kritikakos at nikitec.gr
Wed Apr 8 11:38:00 UTC 2015
Hello Arno,
FreeNAS doesn't come with a compiler and I had to compile with the patch
on FreebBSD-9.3 and then copy the produced mge-shut. Unfortunately it
didn't work out. For every try I was getting "Connection Refused" and
when I tried /usr/local/libexec/nut/mge-shut -D -a <ups_name> I was
always getting 'No matching HID UPS found'.
I returned back to the USB connection now which seem to work better.
Thank you very much for your help anyway.
Best regards,
Panagiotis
On 7/4/2015 10:20 πμ, Arnaud Quette wrote:
> Hi Panagiotis
>
> 2015-04-06 9:13 GMT+02:00 Panagiotis Kritikakos
> <panagiotis.kritikakos at nikitec.gr
> <mailto:panagiotis.kritikakos at nikitec.gr>>:
>
> Hello Arno,
>
> Can apply the patch directly or should I recompile nut?
>
>
> not sure to fully understand your comment, but...
> this is a source code patch, so you indeed have to apply it to the NUT
> source code (from within the source tree, "patch -p1 <
> ../path/to/patch_file), and then recompile (make, at least, or configure).
> note that the configure flags should be adapted to your specific
> distro to ensure easier testing.
> not sure about FreeNas ones, but that can be found in their package repos.
>
> cheers,
> Arno
> --
> Eaton Data Center Automation - Opensource Leader
> NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
> Debian Developer - http://www.debian.org
> Free Software Developer - http://arnaud.quette.fr
>
>
> On 3/4/2015 5:06 μμ, Arnaud Quette wrote:
>> Hello Panagiotis
>>
>> 2015-04-03 14:28 GMT+02:00 Panagiotis Kritikakos
>> <panagiotis.kritikakos at nikitec.gr
>> <mailto:panagiotis.kritikakos at nikitec.gr>>:
>>
>> Hello Arno,
>>
>> Question: have you also tested oldmge-shut?
>> Otherwise, that might be interesting to do so and send
>> back the results of these tests...
>>
>> Yes, I've tried this as well with worse results
>> unfortunately. This driver seems to be even more unstable.
>> When it gets able to set communication with the UPS (which is
>> not always the case), it usually lost it again after a while.
>>
>> ~# /usr/local/libexec/nut/oldmge-shut -DD -a ups-filesrv01
>> Network UPS Tools - Eaton / SHUT driver 0.70 (2.7.2)
>> 0.000000 debug level is '2'
>> 0.000882 entering upsdrv_initups()
>> 0.001019 entering shut_ups_start()
>>
>> 0.028445 Communication with UPS established
>> 0.028457 entering shut_get_descriptor(n 21, 9)
>> 0.111394 shut_wait_ack(): ACK received
>> 0.185328 entering shut_get_descriptor(n 01, 18)
>> 0.273455 shut_wait_ack(): ACK received
>> 0.423238 Device Descriptor:
>> bLength: 0x12
>> bDescriptorType: 0x01
>> bcdUSB: 0x0110
>> bDeviceClass: 0x00
>> bDeviceSubClass: 0x00
>> bDeviceProtocol: 0x00
>> bMaxPacketSize0: 0x08
>> idVendor: 0x0463
>> idProduct: 0xffff
>> bcdDevice: 0x0100
>> iManufacturer: 0x01
>> iProduct: 0x02
>> iSerialNumber: 0x03
>> bNumConfigurations: 0x01
>>
>> 0.423251 entering shut_get_descriptor(n 22, 1538)
>> 0.525087 shut_wait_ack(): ACK received
>> 9.705471 Unable to get Report Descriptor
>>
>>
>> It there a possibility to be an issue of the UPS, or the
>> connection between the serial port of the machine and the UPS?
>>
>>
>>
>> thanks for the confirmation with oldmge-shut. I'm not astonished
>> on the results, but was worth a try.
>>
>> I've double checked the related code difference for mge-shut
>> between 2.7.1 and 2.7.2.
>> Again, the only diff I see is the one pointed previously
>> (setline...).
>> So, it would be great if you could test this patch (through some
>> reboots) and report back.
>>
>> Then, I don't think it's an issue with the device.
>> There is a long run TODO (mentioned in the header of libshut.c)
>> that is the baudrate negotiation.
>> The driver still communicates at 2400bauds, which is not that
>> much for such verbose units. We could go at least for 9600 on
>> these units, which is 4 times faster already.
>> This may cause some slowness and behavior issues as you're
>> experiencing, under some circumstances.
>> For example, the test using a 5SC750 on Linux (Debian Jessie)
>> shows that report descriptor (size 1538) takes ~10 seconds to be
>> retrieved, which is quite long.
>> Then, even if this "new"mge-shut is a lot better than the
>> oldmge-shut, it can still be perfected on the error handling (and
>> not optimal cases), which you may be hitting.
>> And finally, the notification handling could also help to poll
>> less the unit, while being notified of critical status changes.
>>
>> cheers,
>> Arno
>> --
>> Eaton Data Center Automation - Opensource Leader
>> NUT (Network UPS Tools) Project Leader -
>> http://www.networkupstools.org
>> Debian Developer - http://www.debian.org
>> Free Software Developer - http://arnaud.quette.fr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150408/6105a52a/attachment-0001.html>
More information about the Nut-upsuser
mailing list