• ARTICLES
SEARCH

How-To Geek

Use Your UPS to Gracefully Shut Down Your PC During Power Outages

image

If you live in an area that has a lot of blackouts, brownouts, and spikes in your electricity, it’s important to have a UPS (Uninterruptable Power Supply)  to protect your investment. Here’s how your APC UPS can shut down your PC gracefully.

A UPS isn’t just for IT infrastructures and should be part of your desktop PC and home network protection strategy—especially if you have a home media server. In a power outage, it provides emergency power via battery, allows you to safely save your data, and power down your machine properly.

Photo by Aaron Landry

What You’ll Need

For the purposes of today’s article, we’re covering how to use an APC brand UPS, though most other brands of UPS will provide a similar software package that works the same way. Here’s what you’ll need:

For this article we’re using an APC ES 550 Model. Features may vary based on your model and operating system.

sshot-2010-10-31-[22-38-17]

Installing and Setting Up PowerChute

Your APC UPS should come with a version of PowerChute included, although by the time you purchase it, you might want to check to see if there is an update. Ours came with version 2.1.1 and after we registered our UPS, we found Version 3 on their site.

If you have an older version already installed on your machine, you’ll need to manually uninstall it, if you want to make sure it’s a clean uninstall you might want to use Revo Uninstaller Pro or the free version.

sshot-2010-10-31-[19-18-30]

Make sure your data cable is plugged in before installing the software, otherwise you’ll get the following message.

sshot-2010-10-21-[19-25-25]

Installation is quick and easy following the wizard and accepting the defaults.

sshot-2010-10-31-[16-02-49]

A couple of the options you might want to select is software update notifications, and sending power quality info for your location. You can change these settings later after it’s installed too.

sshot-2010-10-31-[19-37-43]

When the installer finishes for 2.1 or 3.0 you’ll have the opportunity to register your UPS right away. It opens your default browser to the APC site.

sshot-2010-10-21-[20-17-44]

Using PowerChute

PowerChute lives in the Taskbar and monitors your UPS in the background and monitors your UPS and power outages.

sshot-2010-10-21-[20-24-47]

Launch PowerChute and you can begin configuring your power backup options.

sshot-2010-10-31-[19-48-19]

Configure your UPS how you want it to run when the power goes out. You can set it to preserve battery power or keep it running longer. Keep in mind if you set it to run longer, it will take up more of the battery power.

sshot-2010-10-31-[19-50-00]

PowerChute allows you to check past performance of the UPS. Like in this example, we show it kicked on on Halloween at 9:30 PM due to a blackout.

sshot-2010-10-31-[22-26-37]

Earlier we mentioned that you can turn off Data Collection is you want to. Go into Configuration Options and uncheck the Data collection options and save the selection.

sshot-2010-10-31-[19-07-29]

Under Notification you can configure the way you get notifications during power events.

sshot-2010-10-31-[19-50-42]

When the Power Goes Out

When the power goes out you’ll get a notification on your screen, and should have plenty of time to wrap up some quick work, save it, and shut down your machine properly.

sshot-2010-10-31-[21-31-42]

If you’re away from your computer, the cool thing is it will put your machine in Hibernate mode after the time you specify.

sshot-2010-10-31-[23-36-11]

When the power is restored, under Current Status you’ll see the batter power has been reduced, it’s charging, and what caused the issue…where in this instance it was a blackout.

sshot-2010-10-31-[21-54-34]

Another cool feature is the Energy Management Settings. If you enable this feature, other components you have plugged into your UPS can be put in a low power state or turned off when not in use. These would be the devices that aren’t connected to the battery backup side of your UPS like printers, speakers, or extra monitors.

sshot-2010-10-31-[22-02-18]

If you’re serious about protecting your computer equipment against power outages and surges, using an APC UPS along with PowerChute Personal Edition is an important part of your protection strategy. Of course if you’re using a Laptop or Netbook it’s not quite as important to use a UPS, as the battery is your backup power.

But, if you have a small network with Desktop computers – especially a server, having a UPS and software such as PowerChute installed, it can protect your investment, save a lot of hassles, and give you piece of mind.

Download & Learn More About PowerChute

PowerChute Version 3.0 is compatible with XP SP3, Vista (SP2), Windows 7, and Windows Home Server Power Pack 1 and higher.


What about you? Do you use an APC UPS along with PowerChute? Leave us a comment below and tell us your story!

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 10/31/10

Comments (33)

  1. HCamper

    Nice Article. You might want to check this site APCUPSD and Open Source Solution at OSN.
    http://sourceforge.net/projects/apcupsd/
    or just Google for APCUPSD.
    The APCUPSD project provides Linux Windows and Apple software solutions.
    They are currently providing Source and Binaries for USB 3.0, USB 2.0 and USB 1.1.
    One of the advantages is since it is an open source project the software works for my Linux
    and Vista, Windows 7 and Windows 2000 systems. An additional feature is the Monitor
    software broadcasts at a welll known port so a Web Server can have a PHP status page for both
    local and remote machines. It has made it very easy to keep track of the Home Network Systems.
    I have also installed their software as part of setting up friends machines.

  2. Siyi

    No APC is a Microsoft only company so I will not use them ever.

  3. Robert

    How can you gracefully shutdown 2 computers on the same UPS? The article above is helpful for 1 PC only.

  4. HCamper

    You might want to check this site APCUPSD and Open Source Solution at OSN.
    http://sourceforge.net/projects/apcupsd/
    The APCUPSD project provides Linux Windows and Apple software solutions.
    This is not a Microsoft Only solution. :)

  5. Al Kolkin

    This product does NOT work and is incompatible with VMware. Therefore, if you have a VMware product on your desktop, the APC software does not work and tells you that it is incompatible.

  6. Marfa

    and it should controlled (or whatever word is correct) UPC… You aren’t able to do this with regular one

  7. Rigsaw

    The APC controlling my Apple PC connected to a second APM is not compatible with Microsoft. VMWare on my Apple PC causes APC to crash because it was written for Windows. Why are it controlled by AC? I believe the regular one is actually a number two.

  8. Al Kolkin

    APC support is not something you want to get involved with; it is formula only and in essence you are on your own. To work with a network, you need the appropriate network-ready version of the APC software, which is available on their site. And, if you think that it will be easy to use and to set up, guess again. APC’s battery products are fine, it is their software that is awful and incompletely supported.

    What we need is some third party development. I have been thinking about getting into that, but I am not ready to do so yet. Furthermore, I am an amateur programmer so I hesitate to get too interested.

  9. Nathan

    @Robert – Just install the software on both computers. Just make sure to have the same settings. Or write a script that sends a shutdown signal when it shuts off. The script on a personal computer will also shutdown the computer every time your restart, etc… so be careful with that or you will shutdown both computers.

    @Al – All you have to do is write a shutdown script (via GPO) in one of the VM’s that waits 60 seconds (Giving all VM’s time to shut down) and then have it power off the ESX Server.

  10. Jon

    Great article. Everyone should run a UPS. I’ve had my APC Back-Ups ES 725 for 5 years now and it still works great. That’s well beyond it’s 3 year warranty period.

  11. Jack Matisoff

    Your interesting article about using the APC Power Chute for automatic shutdown is interesting.
    For about 3 years, I have had two ES 550′s, each connected to a Desktop computer. One for my wife and the other for myself, for personal usage.
    However, I do not recall receiving a cable, as described, or Power Chute software.
    Should I try obtaining that on-line?

    Thanks for the information.

  12. fastoy

    Doesn’t Windows 7 support UPSs natively? Perhaps you don’t get all the features of PowerChute but it should perform all the basic functions.

    I’ve found this MSDN blog post:

    http://blogs.msdn.com/b/virtual_pc_guy/archive/2009/10/22/setting-up-hyper-v-with-a-ups.aspx

    Don’t get distracted by the Hyper-V discussion at the start. In the end he’s talking about the server that he’s running Hyper-V on.

  13. Al Kolkin

    @Robert. it is not a problem that the virtual is on and will not shut down, the problem is that trying to access the UPS is not possible once ANY VMware product is installed. I get the error message and their technical support has not been able to help. If you have a way around installing the software so that it works when VMware Workstation is on the computer, then I would love to have more detailed instructions on how to get around the error messages when I install.

    Thanks.

  14. Martin Rasch

    @Siyi You might try checking out another software monitor product
    for backup supplies. The APCUPSD project at OSN provides Windows, Linux and Apple sofware. The APCUPSD Project has source and installers. They are currently supporting USB3.0 USB 2.0 and Usb 1.1.
    ” Apcupsd a daemon for controlling APC UPSes ”
    project makes monitoring over a network easy. All the programs they have work for my Linux Vista and Windows 7 boxes. :)

  15. Martin Rasch

    @Al Kolkin
    I have not had problems using VBOX,VPC2007,VPC2005 using a backup and
    You might try checking out. The APCUPSD project at OSN provides Windows, Linux and Apple sofware. The APCUPSD Project has source and installers. The problem for control can be handled by running a WMI or VBSCRIPT or power shell script to set and get status for USB devices. The method is very much like mounting pen drives.
    Windows and Linux can Work Together. :)

  16. Brian

    APC units are OK but Tripp Lite provides way better tech support. They make UPS systems that are equivalent to APC as well…and MAC friendly. tripplite.com

  17. Rob

    If you are a windows vista/7 user you can use windows powerplans.

    Windows should detect that you are connected to a battery. That way you can set your computer to shut down without installing extra software as well.

  18. John Tod

    I use the exact same make and model described here. It came with the USB and ethernet cable to allow it to be connected to the computer. The software was easy to set up. It took a few minutes but it was fine. I have one computer plugged into its battery backup along with the monitor and the printer. There are several other outlets as well but they are surge protected and not battery back up protected. To get everything I needed into the battery back up I used a power bar and plugged everything I needed backed up with power into it and then plugged the power bar into the APC. I unplugged the APC to see how long it would last and it lasted 7 minutes and automatically shutdown the PC before its battery ran down. I’m happy with it and the price was right.

  19. koiphish

    @robert – I had the same problem. 2 pc’s on one apc unit. I setup a script to ping the main pc using parachute program and if the pc stopped responding to the pings, it (the script) would put the machine into hibernation mode. I had to set the main pc for 3 minutes to give the other pc time to ping and respond to the lack of response and then shut itself down. That 30 minute battery backup goes to crap when you have more than one pc hooked into it though. But this works. I have a Windows 7 Professional pc and a Ubuntu Linux box on the ups.

  20. David Parkinson

    Just run both PCs with the same settings. Not hard

  21. pizzaface

    Is this an ad or a “how-to”? There’s no DIY about this….

  22. Ammar

    Useful article.
    But there is somthing missing.
    Is there a way to turn the UPS itself off after turning the PC off?
    Thanks

  23. HCamper

    @Ammar Yes you can program the APC to “Go Off Line” but that may not be a good idea. The main advantage for keeping the UPS alive is when power does return the PC can be restarted. This is important for remote servers and closet machines. The APCUPSD documentation and code desribes what can be done for at least APC products.
    One issue that can occur with power down and power up conditions is how the BIOS has been set for when power is removed.
    The UPS will attempt to keep track of how the machine state is maintained.
    When using UPS set the BIOS to “Stay Off” if that is the desired mode or “Restart” after power returns.

    The UPS and it’s software then can control proper state of system.
    The bad case is if your machine is currently in “STAND BY” or “HIBERNATE” and power is lost you may have to do a “LOG OFF” and a “Restart” to really restore normal operation.
    Hope this helps :)

  24. Robert

    I’ve written a script that shuts down the 2nd PC from the first PC; however, this is problematic. Same idea with the ping concept. It’s hard to tell if the first PC was shut down for some other reason (other than the UPS giving a signal that it is running out of power).

    Probably the best way to attempt this is to look for an event in the first PC (connected to the UPS) and if that event occurs, then send the shutdown command to the second PC. I haven’t seen a consistent event in the event log to accomplish this however. I am using Windows PC in this case with Windows 7.

  25. Sasha

    I was wondering, would it be possible to use this APC as a “battery” so that instead of turning off my computer, I just let it sleep – I do this most of the time with my laptop, and per 12 hours of sleep it takes about a third of the laptop battery, but now, since I plan to buy a desktop, I doubt that there are any other methods to do this, apart from maybe this.

    Thanks,
    Sasha

  26. HCamper

    @Sasha The APC or UPS units are designed to provide power from “battery” only when the main power system has gone down.
    The UPS is not really to provide “battery” power as an alternate source.
    If you want to reduce power use “select” or “create” a power profile that will shut down devices and cpu use by a system. For example shut down hard drive after 10 min.,turn monitor off after 10 min, run PCIE bus at 25% and CPU active at 10% and max at 80%. Turn off any network shared services like sync, offline files, home group don’t use photo sharing services. Turn off themes and set for classic style can reduce power by a good amount. If you reduce “eye candy” features the system will speed up and reduce power use. Set windows “search” to manual can reduce how much the hard disk is used.
    The other way to reduce power is controlling what services are set to automatic when starting system. A good guide for service tweak can be found by google or bing “Black Viper” and services. Look at your task bar and remove things like starting up messengers or communications tools. You can reduce power use by looking at what toolbars,plugins or extensions are installed for firefox,flock and IE The methods to reduce power use may make playing games a bit of a challage. Any system can be “Tweaked” for power use at a cost of why are you using a computer and for what purpose.
    I hope this information is a help and not just a “Rant” about design and use of computers. :)

    The problem that you may encounter is reduction of power use may make the computer less useful.

  27. erichv

    I have a APC SmartUPS 2200 but it has a serial (DB9) plug not UPS (Cable is not true RS232 config but works with older PC (WHS) that has a Serial port)
    My newer workstation does not have a serial port and I tried to use a usb to Serial adaptor but PowerChute 3 says it can’t see the link or UPS.
    Either I let the older PC get the signal and let it tell the rest of the system to shut down or I must look around for a USB port for the APC?
    Any bright ideas out there?

  28. HCamper

    @erichv
    You might check out APCUPSD project. The project has some guides for
    creating cables and using custom versions of APCUPSD software for serial and usb.
    The APCUPSD project started when APC only had a serial port. Best thing is to check
    what is at the site.
    LOL :-)

  29. Erich

    What a lot of Smart Arse comments! I dont like Microsoft/APC/whatever, Is this a How-to or a Sales pitch! Etc. I wonder how you can keep up the courage to write anything for these punks!

    What I hope is a valid question is:

    I have an older APC SmartUPS 2200 that works flawlessly but still has a serial port for it’s control.
    I have a newer PC with Windows 7 but no serial port.
    I purchased a USB to Serial adaptor and I DO have the correct APC “serial” cable but running the install for PC3.0 or an older version, they all get stuck with wanting to see the UPS before continueing the install.

    Any suggestions?

  30. Erich

    Damn! I see HCamper left me an answer and i asked the question before! (Blush) Still think there are to many Smart Arses out there though!

    Thanks HCamper – i will go and dig around APCUPSD Project and see what I can get.

    Regards

    “Where Ignorance is Bliss, ’tis Folly to be Wise” – Thomas Gray

  31. steve

    Executing a remote command in the Win7/2008R2 world is pretty hard. UAC gets in the way of using PSEXEC. There may be a way to use event subscriptions and forwarding in order to achieve this, however. I’m going to try and get this working. For instance, if you have WHS 2011 plugged into the UPS, and the management cord plugged from the UPS into that server, and then another PC connected to the same UPS, you may be able to set it up so that the eventlog entry from powerchute forwards to the PC, and the PC has a task set up to invoke shutdown. These are nifty event log features that are relatively new to Windows, and may provide the answer. Will test and if it works I’ll post back here.

  32. steve

    Well then.. Turns out it’s quite doable to forward events from one computer to another.
    This is handy, because Powerchute will throw events into your application log when AC power is lost, and when it’s restored.
    Leveraging this, you can set up OS-level event subscriptions between PCs, so that in the previous example with a UPS hooked up to one computer, the second computer’s event log gets notified when the UPS switches to battery power even though it’s not directly connected to the UPS. In turn, you can set up actions for that event, including shutting down the PC, all using built in tools that come with Windows Vista or newer.
    So shutting down multiple computers from one installation of Powerchute Personal Edition can be accomplished this way. It’s called event forwarding, and there are instructions on Technet to accomplish this. Pay particular attention to the caveats for configuring this in workgroup environments vs. domain environments.
    It gets more difficult if you have any ambition to outlast the power outage. For instance, if you want to keep the computers on until power in the battery is about to run out, hoping that AC is restored first, the job is not possible using any out-of-the-box or easy tools that I’ve found. The complication is because Powerchute does not throw events about battery status.
    I also tried removing Powerchute and using the native Windows power management tools. Similarly, too few events are logged about battery status. The best that windows will do is tell you that the computer will eminently enter sleep mode, hibernate or shut down because of the battery level. You have a lot of control over when the action happens with respect to battery level – you can tell windows to shut down when the battery level reaches xx%, say 80% if you want to be aggressive. However, the local event log entry only happens immediately before the action is taken and with this comes substantial risk that the event will not be forwarded to other computers before the primary computer actually goes offline. It happens that quick. This is rather annoying since you will be bothered by pop-up balloons from the system tray when your battery level reaches different levels, but this is simply a graphical presentation – no event is logged and thus nothing to systemically act upon.
    This problem would be very easy to work around if you had a tool that periodically entered events into the Windows event log based on battery level, e.g. “Battery is at 10%”, “Battery is now at 8%”, and so on. This is not that hard to build, as querying the battery level is very easy from script and plenty of examples are available online. Similarly, examples for writing to the event log are separately available. It just happens that no one has bothered to write such a thing and make it available to the world. It could be done one of two ways – write it as a service in .net, giving the service the permission to write to the event log and sleeping for a set period of time in between polling and logging activity. Alternately, one could write a vbs or powershell script to poll and log, kicking it off at set intervals via task manager. I think this latter method would be less reliable than a service as that’s just the nature of running scheduled tasks, but the scheduled task method can be done through script whereas the service requires ‘real’ programming knowledge. >:D
    Anyway, doing all these things (event forwarding, creating a polling script) requires moderate to intermediate knowledge of manipulating your systems manually. It requires reading and experimenting and I’d imagine about a good twelve hours of your time. If you write the script, post it back so we can all use it. If I do, I will, but the power of laziness is strong in this one.

  33. Mike

    I put together a DAW (Digital Audio Workstation) for my recording studio, got a custom computer built for DAW work, NEVER hooked it to the internet, got an APC for it ($150) and have had it fail many times to keep the computer on during power “events.” Three such “events” happened last week in one recording session.
    The peripherial equipment stays on, but the computer immediately shuts down! I contacted their tech support, who were less than helpful. I had to really dig deep into their forum to find the problem had happened to others too. Finally, tech support admitted to me that indeed there were some computers with certain chipsets that didn’t shut down correctly, that wouldn’t go on battery backup!
    APC needs to be up front about this little detail and put it into their product info. the potential customer sees when choosing a UPS. I bet they will never admit a weakness.
    I won’t buy APC ever again. Promise.

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!