I had a power hiccup yesterday and a server connected to a Best Ferrups
18KVA shutdown. The problem is that the UPS is reporting remaining
runtime in minutes but nut treats it as seconds (so nut thought it only
had 46 seconds left).
Simple patch:
diff -urN nut-2.2.1-dist/drivers/bestfcom.c nut-2.2.1/drivers/bestfcom.c
--- nut-2.2.1-dist/drivers/bestfcom.c 2008-06-13 14:04:07.000000000 -0500
+++ nut-2.2.1/drivers/bestfcom.c 2008-06-13 14:05:00.000000000 -0500
@@ -277,8 +277,8 @@
/* AC line frequency */
acfreq = ((double)bcd2i(&fstring[54], 4) / 100.0);
- /* Runtime remaining */
- btimeleft = bcd2i(&fstring[58], 4);
+ /* Runtime remaining (UPS reports minutes) */
+ btimeleft = bcd2i(&fstring[58], 4) * 60;
if (fc.model != FDxxxx) {
/* Iout. int times 10 */
--
Chris Adams <[EMAIL PROTECTED]>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev