[Nut-upsdev] Best Ferrups reporting uptime in minutes, not seconds
Chris Adams
cmadams at hiwaay.net
Fri Jun 13 19:11:50 UTC 2008
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 <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
More information about the Nut-upsdev
mailing list