On Sunday 22 August 2004 10:27 am, Paolo Alexis Falcone wrote: > > In theory, a dumb UPS serial cable would detect when the UPS switches > from AC to DC when a power failure happens. A "smart" UPS would be able > to detect more information. > > I'm not really that conversant in electrical engineering (how I do wish > I took that :D) so any suggestions on how to go about with this?
Hi Paolo, Here's an idea. You can use an old modem (or any other AC-powered PC peripheral) to detect power failure and power resumption. I think it would be trivial for you to whip up a (most probably python) script to regularly poll a modem (plugged directly to an AC power supply, NOT into the UPS). When the modem stops responding, it means there is a power failure, and your script should initiate a clean shutdown in "n" minutes, depending on how long your UPS is able to power your server on batteries. When the modem starts to respond again, your script should then cancel the scheduled shutdown. You can even design the script so that it can still do its job even when there's someone connected (dialup) to the modem. I guess this solution would be best suited for UPSes without serial ports. HTH, -eric -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
