Date: Wed, 1 Mar 2000 15:37:31 -0500 From: "John Straiton" <ne@clickcom.com> To: "Dan B. " <danielb@pacex.net> Cc: <freebsd-questions@FreeBSD.ORG> Subject: Re: SmartUPS 1400 Message-ID: <038201bf83bd$f7f41790$1f16c6d1@clickcom.com> References: <Pine.BSF.4.10.10003010919190.64359-100000@almazs.pacex.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> This is OK, but suppose you have a server hooked-up to a 1400VA UPS (which > will keep going for approx 1hr 30min after an outage) do you realy want to > shutdown in 60 secs? 20 min? why not shutdown when there is only enough > battery power left in the UPS for say 5minutes? We're bordering on "why don't you open the upsd.conf and look at how it works" here... Don't be scared to look at what's there and try to reverse engineer it. The upsd.conf just matches conditions. You should be able to rewrite it to check for %recharge% being below a certain number while "line-fail" was still a condition. Just combine the lines you see there. Try a combination and then see what happens. Without trying this or even really knowing how it works it would probably look like: on "line-fail" every 60 { log emerg "** Power down. Will halt when battery falls below 10% charge! **" on "recharge" < 10 { poll "shutdown" sleep 2 exec "/sbin/halt &" }} Theoretically, I'm looking at code that would check every 60 seconds after the AC has been lost for the battery being below a 10% charge, if so it would start the shutdown. Personally, I just happen to have a rather static load on that gear so I know the approximate number of minutes the gear will work whilst on battery. Lets assume that number is 30 minutes (pretty close to the exact tests we've run), then I'd set the 60 to a number like 1500 so that at 25 minutes, the shutdown begins. I'm just trying to help, perhaps someone with more knowledge of the actual code could do a better job here but it looks like few are answering you. John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?038201bf83bd$f7f41790$1f16c6d1>