UPS directed system shutdown info needed

pri=-10 Stuart Lynne sl at van-bc.UUCP
Sun Jan 22 19:52:56 AEST 1989


In article <3149 at ttrdc.UUCP> levy at ttrdc.UUCP (Daniel R. Levy) writes:
>In article <32 at elgar.UUCP>, ag at elgar.UUCP (Keith Gabryelski) writes:
>< The second scenario is for any system that does not use an internal
><     A daemon monitors a serial port for a message from the IPS tell it
><     that the system is on battery power.  Actually, the daemon blocks

>I could see a possible problem with this if the port jams;  the UPS could
>go on battery power and the system would fail to notice, nor would it notice
>the fact that the port had jammed.  Mightn't it be better to have some kind
>of continuous "self test" going on?

A simple way to do this would be to have a little watchdog box, simply
emitting a stream of characters at a known rate. If it is powered from the
same supply as the UPS unit it will stop sending when the power goes out. 

All you need is a simple watchdog deamon under Unix to do a shutdown if it
doesn't see a character on the appropriate port for a specified period of
time.

I'm sure that a reasonably good hardware type could design something
appropriate in a few minutes using a 555 timer, garden variety UART, and
appropriate glue parts.

This would have the advantage of working easily with virtually any UPS
without having to have something overly intelligent in it.

The watchdog is very simple to write, set an alarm, read a char, loop. If
the alarm ever goes off call shutdown. To keep things robust make the
character rate about 1/5 of alarm time.  For example if you have a twenty
minute UPS (i.e. you can run twenty minutes from your UPS) and need ten to
shut things down safely; set the watchdog alarm for five minutes, and watchdog
hardware for one char per minute.

-- 
Stuart.Lynne at wimsey.bc.ca {ubc-cs,uunet}!van-bc!sl     Vancouver,BC,604-937-7532



More information about the Comp.unix.questions mailing list