Date: Fri, 6 Feb 1998 10:49:01 -0500 (EST) From: John Fieber <jfieber@indiana.edu> To: "Bruce M. Walter" <walter@fortean.com> Cc: hackers@FreeBSD.ORG Subject: Re: Powering off the system/UPS Message-ID: <Pine.BSF.3.96.980206102812.9421I-100000@fallout.campusview.indiana.edu> In-Reply-To: <Pine.BSF.3.95q.980206095913.22500A-100000@callisto.fortean.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Feb 1998, Bruce M. Walter wrote: > > And halt(8) or shutdown(8) are incapable of doing the Right > > Thing? I'm still failing to see the point. > > The closest thing to a kernel callout which could call a UPS inverter > poweroff routine is at_shutdown/SHUTDOWN_POSTSYNC but some drivers (the > DPT driver for sure and maybe others) use this queue to flush unwritten > data from their cache to disk *AFTER* the final FS sync. Since that > callout list is not ordered, there's no way to insure the power wouldn't > be cut after that flush has been performed. Okay, I'm seeing the point (I think). You want to shutdown the OS, *then* tell the UPS to shut down. I suppose that is reasonable, since it at least gives the illusion of guaranteed cleanup as opposed to telling the UPS "shutdown in 60 seconds" and then calling halt(8) and hoping it can do its thing before the UPS shuts off. [I say "illusion" because if the time between a low battery warning and a dead battery is less than your halt(8) time, you are SOL either way. With a sufficiently smart and powerful UPS, you should be able to avoid such situations though.] -john
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980206102812.9421I-100000>