Path: utzoo!mnetor!motto!ecijmm!ecicrl!clewis From: clewis@ecicrl.UUCP Newsgroups: comp.unix.questions Subject: Re: UPS directed system shutdown info needed Message-ID: <189@ecicrl.UUCP> Date: 21 Jan 89 02:15:41 GMT References: <210@wa3wbu.UUCP> Reply-To: clewis@ecicrl.UUCP (Chris Lewis) Organization: Elegant Communications Inc. (CRL Division) Lines: 37 In article <210@wa3wbu.UUCP> john@wa3wbu.UUCP (John Gayman) writes: > > My question is, how are these interfaces being handled by small Unix >boxes ? I'm using a 386 machine running Microport V/386. What would >it take to have the system shutdown (logically) from a signal on an UPS ? >I assume most UPS's interfaces simply bring a signal low (or high) and >its up to the system to act upon it ? Or does the UPS carry on a >dialog with the CPU ? (ie: Pssst, I have 3 minutes left, watta ya wanna >do, shutdown or go for broke ? Well punk, do ya feel lucky ?) The ones I've seen have only two lines: - one to the computer saying "AC Gone!" - one to the UPS saying "shutdown completely". Twould be also nice to have a "n minute warning"... Altos machines have some sort of hardware/software package to use some UPS's. So does Novell for messydos. What you can do if you have a serial port to burn, is to connect the "AC Gone!" wire to receive data or CD or something, and have a bit of software waiting for a transition on that line. When it sees it, it does: echo bye bye | /etc/wall sleep 20 /etc/telinit 0 (or some such). You'll have to ensure that the voltages are okay (< +-12) and that the transition can be reliably detected. Might even be able to do it without losing the port... -- Chris Lewis, Markham, Ontario, Canada {uunet!attcan,utgpu,yunexus,utzoo}!lsuc!ecicrl!clewis Ferret Mailing list: ...!lsuc!gate!eci386!ferret-request (or lsuc!gate!eci386!clewis or lsuc!clewis)