Distributed UPS power status notification

electron

Administrator
Staff member
I have several machines that run 24/7 and are all hooked up to the same UPS. I have several Windows 2003 Servers, XP machines and linux servers. I am looking for a way of having all my machines shut down gracefully when it looks like the battery is going to die soon.

I have done this in the past using the Network UPS tools, but all my linux machines are virtual now, and my UPS uses a USB interface to report its status, so the UPS has to be hooked up to a Windows machine. I can not find a port of the server version, so I am looking for another solution.

If anyone is aware of a similar application which supports Windows, Linux and CyberPower UPS units, please don't hesitate to post here! Thanks!
 
I have several machines that run 24/7 and are all hooked up to the same UPS. I have several Windows 2003 Servers, XP machines and linux servers. I am looking for a way of having all my machines shut down gracefully when it looks like the battery is going to die soon...

Have you looked at the APC UPS Daemon? From their webpage: "Apcupsd can be used for power mangement and controlling most of APC's UPS models on Unix and Windows machines. Apcupsd works with most of APC's Smart-UPS models as well as most simple signalling models such a Back-UPS, and BackUPS-Office. During a power failure, apcupsd will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exhausted, a timeout (seconds) expires, or runtime expires based on internal APC calculations determined by power consumption rates. Apcupsd is licensed under the GPL version 2."

http://www.apcupsd.org/
 
I have several machines that run 24/7 and are all hooked up to the same UPS. I have several Windows 2003 Servers, XP machines and linux servers. I am looking for a way of having all my machines shut down gracefully when it looks like the battery is going to die soon.

I have done this in the past using the Network UPS tools, but all my linux machines are virtual now, and my UPS uses a USB interface to report its status, so the UPS has to be hooked up to a Windows machine. I can not find a port of the server version, so I am looking for another solution.

If anyone is aware of a similar application which supports Windows, Linux and CyberPower UPS units, please don't hesitate to post here! Thanks!


can't you script something where the Windows PC is shutting down, it sends out the same shutdown commands to the other VPCs?

I remember seeing a piece of software that was a shutdown folder. It worked like the startup folder. Anything in there was executed before shutdown.

I'm not sure if it waited for the thread to close before turning off the PC.

http://www.hs-lab.com/products/df/

--Dan
 
The only problem with the Shutdown folder issuing shutdowns to other stuff is what if that pc is shutdown for another reason, then all the other stuff shuts down which would not be a desired outcome. Unless you just put a script in the shutdown folder which checks power status, etc before issuing other shutdowns.
 
I've found the single master/multiple slaves approach is usually best (one to many). That is, use one machine that talks to the UPS and also sends info about the UPS/power status to all other machines. You can tier this to some degree if you want, but you have to be careful of timing when batteries start to die. Be conservative in the on-battery run-times - they only get shorter as batteries age.

I have done this using APC's network shutdown software on Windows machines in the past for a 3-tier shutdown across my network. The last machine to shut down was the UPS communication and also happened to be my main home automation machine. (In fact, if I still had a working APC UPS with the interface, I'd still have it running here - I lost the UPS last year and haven't replaced it yet.)

If you can't use software that exists, you can always set up some type of semaphore system - where a script periodically looks for the existence (or non-existence) of a file in a certain place, and if it exists (or not), it starts an orderly shutdown of that machine. You can program in safeguards to hedge the odd non-communication or dead machine issues, too. I used to do this (semaphore files) with a Novell-based network of BBS machines when they were all on a couple UPSes. It did a pretty good job saving the machines from catastrophic power loss and possible data corruption during bad T-storms in So FL when I lived there.
 
Back
Top