2009/5/7 Daniel O'Connor <[email protected]>

> On Wed, 6 May 2009, Arnaud Quette wrote:
> > I think I've found something, but I would need an upsd debug output
> > (level 3) to see what going on the state socket.
>
> I've attached a log for you.
>
> > A few more questions:
> > - would you be able to test a patch?
>
> Yep.
>

attached, with explanation.
can you also test a real disconnection of the serial cable, and report back
if everything is ok?

cheers
Arnaud
-- 
Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
--- drivers/mge-shut.c	(révision 1840)
+++ drivers/mge-shut.c	(copie de travail)
@@ -187,7 +187,12 @@
 	if (commstatus == 0) {
 		if (shut_ups_start () != 0) {
 			upsdebugx(2, "No communication with UPS, retrying");
-			dstate_datastale();
+			/* don't bit the UPS to death. using that protocol,
+			 * units tends to be "flooded" temporarily under some
+			 * circustances (battery test, autonomy recalc., ...).
+			 * we leave to upsd to declare the device staled!
+			 * dstate_datastale(); */
+			sleep(2);
 			return;
 		} else {
 			upsdebugx(2, "Communication with UPS established");
@@ -226,10 +231,11 @@
 				  dstate_setinfo(item->type, item->fmt, hValue);
 
 				dstate_dataok();
-			} else {
+			} /* don't bit the UPS to death. see above
+			   * else {
 				if (shut_ups_start () != 0)
 					dstate_datastale();
-			}
+			}*/
 		}
 	}
 }
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to