UPS to keep several computers in sleep/hibernate

GeorgiaOverdrive

Distinguished
May 30, 2014
116
0
18,680
I have nine Windows computers running long CPU-intensive tasks. Five are on one UPS and four are on another. Today we had a blackout - too long for the UPSs to keep the computers up. However, there are two computers attached to the UPSs by USB and they run the software to monitor the UPSs. These two did not die - they went into sleep or hibernate mode (the UPS must have told them to do that). When powered back up after about 100 minutes, they picked up where they had suspended.

Is there an easy way to have all of the computers do this? For instance, could I use a USB hub to connect to each computer, and have each computer run the software? Would something like that work? (Of course, it would be too expensive to have a UPS for each computer.)
 
Solution
In my case it happens over the network(\\Richard-PC specifies the computer to shut down) since all computers are on the same network and it's equipment is also powered by UPS.

I am sure you can get other methods to manage a UPS over a network as well(but sometimes the UPS needs its own network card and these are found on much more expensive systems). My setup is much more simple one computer just tells the other to shut off after the power is out. If it is restored, it tells the other computer to cancel the shutdown(5 min window).

In my case this is all part of the APC Powerchute business edition software. It has all kinds of things it looks for and command files can be added to any events. I have one for Power loss and Power restore...
You may be able to use a batch file to force hibernate on other systems if your UPS supports running a script on power failure.

You will need to have the other systems passwords(or have them all with the same one.)

Checkout the command prompt and use the shutdown command. I have only used it for system shutdowns not hibernate so that is untested by me.

My file is simply

C:\WINDOWS\system32\shutdown /t 300 /s /d U:6:12 /m \\Richard-PC

t /300 Give 5 minutes(in case the power comes on so the it can be aborted with another batch file is the power comes back within 5 min).
/s Shutdown the computer
/d gives a reason for the shutdown.
U is unplanned and the 6:12 means power failure.
 


How would the UPS communicate to the computers whose A/C is plugged into it, but not connected by USB?

 
In my case it happens over the network(\\Richard-PC specifies the computer to shut down) since all computers are on the same network and it's equipment is also powered by UPS.

I am sure you can get other methods to manage a UPS over a network as well(but sometimes the UPS needs its own network card and these are found on much more expensive systems). My setup is much more simple one computer just tells the other to shut off after the power is out. If it is restored, it tells the other computer to cancel the shutdown(5 min window).

In my case this is all part of the APC Powerchute business edition software. It has all kinds of things it looks for and command files can be added to any events. I have one for Power loss and Power restore.

Before that I had software that simply ran a batch file when the computer was shutting down(since it was always on. Shutting down would only happen in power outs). This did backfire sometimes because I could shutdown to clean and forget and it would shut down my other system. You should be able to do this in the task scheduler as well.

USB hubs just do not work the way you want them to. They connect a single system to many ports not many systems to one port.
 
Solution
Simpler way is to use a watchdog solution.

Have all systems on a small network, have one master system be the only one plugged into the UPS via USB. (obviously all are powered by the UPS battery backup sockets)

Have all other computers ping or keep a connection open to the master. When the ping fails or connection is terminated, have all systems immediately hibernate.

Very easy to write a script to do so.
 


I know how to write mainstream Windows applications, but I don't know how to do this pinging over the network, etc. They are on a network, but they can't see each other.