UPS monitor (was: Re: Shayne's Guild clock [was: Re: [plug] usb2 woody])
Harry
harrymc at decisions-and-designs.com.au
Sat May 15 22:06:53 WST 2004
On Sat, 15 May 2004 21:28:20 +0800 (WST) "Shayne O'Neill"
<shayne at guild.murdoch.edu.au> wrote:
> yeah. thats exactly what happens. :(
>
> its actually on a ups, but murdoch uni seems to get some unholy long
> poqwe outs and its a funky old ups that doesnt have any warning system
> for the server.
Hi Shayne
Here's an idea. How about plugging a simple interface into the same power
point as feeds the UPS. This sends a signal to the server (lowers DTR on a
serial port or something) when the power goes away. If you know how long
the UPS normally lasts, just write a little app that watches the DTR line.
When it drops, run a timer to keep the server up for maybe 75% of UPS run
time then elegantly shut it down.
The interface could be as simple as a DC plug pack connected to a relay
with the relay contacts wired across the CTS and DTR pins (and appropriate
driver calls to raise one and monitor the other). A small relay may fit
inside a DB25 cover. Electrical isolation using a relay is also Good(tm).
Or use the UCC door sense method. The switch (or relay contact) is between
the transmit and receive pins of the serial port. If you send a char and it
doesn't return, the relay is open which means the power has gone off.
It'd be fun and has the added bonus that PLUGers will stop going on and
on (and on .. ) about times on your email ;-)
Harry
--
Are you a computer angel? http://www.computerangels.org.au/
More information about the plug
mailing list