Date: Fri, 27 Sep 2002 10:36:53 -0500 From: "Jack L. Stone" <jackstone@sage-one.net> To: David =?iso-8859-1?Q?Sieb=F6rger?= <drs@rucus.ru.ac.za>, Petri Riihikallio <Petri.Riihikallio@Metis.fi> Cc: questions@FreeBSD.ORG Subject: Re: How to shut down cleanly by killing power Message-ID: <3.0.5.32.20020927103653.01026638@mail.sage-one.net> In-Reply-To: <20020927151424.GA430@rucus.ru.ac.za> References: <a05111b01b9b9ea46ac33@[192.168.0.2]> <a05111b01b9b9ea46ac33@[192.168.0.2]>
next in thread | previous in thread | raw e-mail | index | archive | help
At 05:14 PM 9.27.2002 +0200, David Sieb=F6rger wrote: >On Fri 2002-09-27 (14:00), Petri Riihikallio wrote: >> Have you thought about this situation: >>=20 >> 1. The UPS is almost empty, and the monitoring system issues shutdown -p >> 2. The system starts the shutdown sequence. It can take well over a=20 >> minute. There is no way to stop it now. >> 3. Power returns before the UPS is completely empty. >>=20 >> Now the system has shut down with the -p flag, but power is=20 >> continuously available. The system won't boot automatically, no=20 >> matter what you have set up in BIOS, because the power never was down. > >The way I've set it up, upsmon (part of NUT) issues a 'shutdown -p' >when the battery is low. A local hack to rc.shutdown then instructs >the UPS to turn itself off a few seconds later, by running: > > /usr/local/libexec/nut/newapc -a su1000 -k -d 3 > >In the scenario you describe, things would work like this: > > - mains power fails, and the UPS runs on battery power > - eventually, the battery runs low > - upsmon starts the shutdown process > - rc.shutdown tells the UPS to turn itself off > - the PC turns itself off > - some seconds later, the UPS shuts down as instructed, without > draining its battery > - mains power is restored > - the UPS notices that power is restored, powers up again, and the > PC boots > >There is still a short period during which deadlock could occur >(between the PC shutting down and the UPS shutting down), but this is >far shorter than the time between the PC shutting down and UPS >draining its battery. > > >--=20 >David Sieb=F6rger >drs@rucus.ru.ac.za In my case where I DON'T want the machines to restart after complete shutdown, was from an expensive learning experience. In our area (summertime subtropics), sometimes the power comes back on but flips right back off -- just as the machine is trying to restart -- this happened THREE times in one day. One machine did not survive the abuse and it fried the motherboard and damaged one memory strip beyond reliability. So, no thanks to the unattended restarts after being in the trenches like this. It only happens once oe twice in a year, but ONCE is more than enough for me....!! If you don't have this type of problem, then okay. But, how would you know...??? Best regards, Jack L. Stone, Administrator SageOne Net http://www.sage-one.net jackstone@sage-one.net 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?3.0.5.32.20020927103653.01026638>