Subject: Re: UPS unattended shutdown
To: Jason Thorpe <email@example.com>
From: Dan J Fraser <firstname.lastname@example.org>
Date: 03/14/1997 17:01:07
On Fri, 14 Mar 1997, Jason Thorpe wrote:
> [ CC'd tech-userlevel, since this is probably a totally userland thing. ]
> On Fri, 14 Mar 1997 16:27:43 -0500 (EST)
> Dan J Fraser <email@example.com> wrote:
> > I'd like to set up NetBSD to automatically shut down my UPS during a power
> > failure... monitoring the UPS is not a problem, but I need to send an
> > ioctl to the serial port to tell the UPS to shut off power to the computer
> > after NetBSD has shut down completely.
> Hmm, do you _need_ to perform an ioctl? What is the command you send
> to the UPS? Can't you just write a message out the tty? (I assume
> you're reading messages on the tty from the UPS..)
The UPS (APC Back-UPS 400) requires a high RS-232 level signal to one of
it's pins in order to shut down the power.
The UPS puts out high RS-232 level signal to indicate a power
failure... so it could be monitored by watching the CD line of the comport
or somesuch. You'd do something like raise DTR to tell it to shut down.
The UPS will only shut off power during an actual power failure, so
accidental shutdowns aren't really a problem.
Dan J. Fraser -- firstname.lastname@example.org
IRC Nick: Optic Finger me for PGP public key
Anytime things appear to be going better, you've overlooked something.