*BSD News Article 87488


Return to BSD News archive

From: Keith Walker <kew@phobos.walker.org>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: APC Smart-UPS v/s Software
Date: 25 Jan 1997 18:24:02 -0800
Organization: Keith's House
Lines: 38
Message-ID: <87vi8lfa2l.fsf@phobos.walker.org>
References: <32e95f43.45703147@news.netonecom.net>
NNTP-Posting-Host: natca.spk.wa.us
X-Newsreader: Gnus v5.2.25/XEmacs 19.14
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!ames!enews.sgi.com!news.sgi.com!howland.erols.net!feed1.news.erols.com!insync!uunet!in3.uu.net!206.96.83.98!news.dsource.com!cnn.isc-br.com!phobos.walker.org!usenet
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:34513


kjewett@netonecom.net (Keith R. Jewett) writes:

> 
> I recently obtained an APC Smart-UPS v/s 1000 to protect my server
> running FreeBSD that I use for a class at the University where I
> teach.
> 
> Unfortunately, it only comes with software for SCO and UnixWare
> versions of UNIX.  
> 
> Anybody out there ever write up anything that will allow this to
> "communicate" with my FreeBSD system.  Don't need anything real fancy,
> just the ability to have a 'controlled' shutdown before the UPS runs
> out of power and if possible leave it in a mode that allows it to
> restart when power returns.
> 
> Any help appreciated.
> 
> 

If you don't need anything fancy, then why not hook the computer up to
the UPS, and then hook up some old 2400 bps modem to the unconditioned
power. Now, configure that modem so that it always asserts the DCD
line, which should be possible with any Hayes-type modem, then write
some little daemon that just opens that modem port and waits for a
character. When the power goes off, the computer will keep going, but
the modem will shut off, cuasing the DCD to be lowered, invoking a
SIGHUP to your little daemon. The daemon then performs a shutdown.

I used this method back before there were such things as
smart-UPS's. I realize it's a ridiculous waste of both a serial port
and the UPS's capabilities, but you *did* say you didn't want anything
fancy :-)

-- 

keith.