Subject: Re: UPS - on a IIcx
To: Dave Paton <suprdave@purdue.edu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 03/07/1997 10:30:45
> 
> >> Well, here at our university has every server and router an ups, and
> >> they use a COMERCIAL software that shutdown the servers if the ups
> >> will become to exhausted during a powerdown.
> >
> >If you buy a "Best Power" brand UPS, you can ask them for documentation
> >on their serial protocol.  They'll provide you with example source code
> >as well.
> 
> To put my $0.02 in, I seem to recalll there being a UPS addon for linux. 
> Could we do something similar? From what I remember, all it did was 
> monitor the serial connection to the UPS (APS brand I think) and if it 
> got a signal that there was a problem, it would do somethign like a 
> shutdown -h now. This doesn't seem too hard. Maybe even a LKM?

This feature doesn't need to go into the kernel. Just run something like
one of the upsd's another persion mentioned.

Basically you'd write (or run) a program which opens the serial port and
talks to the UPS. When the UPS says there's trouble, the program takes note.
Either then, or after a small delay with continued loss of power (to avoid
tripping off of glitches), your program fires off a "shutdown -h now".

This program would of course have to be run by root.

Take care,

Bill