Blackouts and power outages (and the data loss they can cause) can happen anywhere. While Windows XP Professional contains a backup utility that can be used to protect your data, and you may use a network drive that's backed up every night for your data, you should also be concerned about keeping power going to your PC during its normal operation between backups. A battery backup unit (also called a UPS, which is short for Uninterruptible Power Supply) can provide battery power to your system for as much as ten to fifteen minutes, which is long enough for you to save your data and shut down your system. The UPS plugs into the wall (and can act as a surge suppressor) and your computer and monitor plug into outlets on the rear of the UPS. Electronic circuitry in the UPS continually monitors the AC line voltages, and should the voltage rise above or dip below predefined limits or fail entirely, the UPS takes over, powering the computer with its built-in battery and cutting off the computer from the AC wall outlet. As you might imagine, to prevent data loss, the system's response time has to be very fast. As soon as the AC power gets flaky, the UPS has to take over within a few milliseconds, at most. Many (but not all) UPS models feature a serial (COM) or USB cable, which attaches to the appropriate port on your system. The cable sends signals to your computer to inform it when the battery backup has taken over and to start the shutdown process; some units may also broadcast a warning message over the network to other computers. UPS units with this feature are often called intelligent UPS units. TIP If the UPS you purchase (or already own) doesn't come with Windows XP-specific drivers for the shutdown and warning features, contact the vendor of the UPS for a software update. The Power Options applet in Control Panel can be found by clicking Start, Control Panel, Performance and Maintenance, Power Options. Figure 30.14 shows the UPS tab, which enables you to select the model of UPS that's connected to your system, set up signaling for models which support automatic shutdown, and inform you of the battery's condition and how long you can expect the system to work from battery (a factor often called the UPS runtime). Figure 30.14. The UPS tab in Power Options after a UPS model has been selected, but before the UPS has been connected.If your UPS doesn't have provisions for automatic shutdown, its alarm will notify you when the power has failed. Shut down the computer yourself after saving any open files, grab a flashlight, and relax until the power comes back on. UPS Considerations for Windows XP ProfessionalIdeally, all your workstations assigned to serious tasks (what work isn't serious?) should have UPS protection of some sort. Although it's true that well-designed programs such as Microsoft Office have auto-backup options that help to restore files in progress if the power goes out, they are not always reliable. Crashes and weird performance of applications and operating systems are enough to worry about, without adding power loss on top. And if the power fails during a disk write, you might have a rude awakening because the hard disk's filesystem could be corrupted, which is far worse than having a lost file or two. My advice is that you guard against the ravages of power outages at all reasonable costs. With the ever-increasing power and plummeting cost of notebook computers, one of the most economically sensible solutions is to purchase notebook computers instead of desktop computers, especially for users who change locations frequently. They take up little space, they are easier to configure because the hardware complement cannot be easily altered, and they have UPSs built in. When the power fails, the battery takes over. TIP When you're using laptops, be sure your batteries are still working, though. With time, they can lose their capacity to hold a charge. You should cycle them once in a while to check out how long they will run. If necessary, replace them. Also, you should set up the power options on a laptop to save to disk (hibernate) in case of impending power loss. You'll typically want to set hibernation to kick in when 5 to 10 percent of battery power is remaining, just to ensure that the hard disk can start up (if sleeping) and write out the system state onto disk. If you are using Windows XP Professional systems as servers, you'll certainly want UPS support, as discussed in the networking section of this book. Windows XP Professional can alert any connected workstation users of impending system shutdown as the UPS battery begins to drain if their UPS units are equipped with suitable software drivers. Users are warned to save their work and shut down (assuming they are running on a power source that is also functional, of course). Before shelling out your hard-earned dough for UPS systems, you should check to see which ones are supported by Windows XP Professional. Consult the Hardware Compatibility List on the Microsoft site. Also, consider this checklist of questions:
TIP In some cases, UPS vendors provide software for configuring their devices. You can use them instead of the one provided in Windows XP. Installing and Configuring the Windows XP UPS ServiceIf you are going to use a UPS that doesn't support signaling to the computer via a data cable, you don't have to worry about installing or configuring the Windows XP UPS service. It won't make any difference and isn't needed. You can install the UPS according the manufacturer's instructions or, if it's a Plug-and-Play device, follow standard procedures for installing new hardware. Typically, you connect the UPS to the power source, the computer to the UPS, and the serial cable between the UPS and the computer. CAUTION Be aware that normal serial cables do not cut the mustard for connecting a UPS to a Windows XP Professional machine. UPS serial cables, even between models from the same manufacturer, use different pin assignments. You're best off using the cable supplied by the maker of the UPS. Another way to install the driver for a particular UPS model is to go to the Control Panel and run the Power Options applet, as shown in Figure 30.14. Click Select, and choose the UPS make and model you have and the COM port the UPS data cable is on, if any. The COM port is used to receive signals from the UPS about its charge level and the state of the AC power source. If your UPS isn't listed, choose Generic Make, select Custom, and make sure to check the signal polarity settings in Table 30.6. For listed UPS devices, the polarities are preset for you. After you select the type of UPS, return to the UPS tab of the Power Options Properties dialog, and click Configure to set up what you want Windows XP Professional to do in the event of a power interruption. The UPS Configuration dialog is shown in Figure 30.15. Figure 30.15. Here, you can set the UPS and system behavior for cases of power outage.Editable items on the tab differ, depending on what UPS you have installed, but they fall into the following categories:
You can use Table 30.5 when you're considering the settings.
Setting Polarities for a Generic UPSFor a smart UPS, serial data lines are used to communicate with the UPS. For a generic UPS, though, the data lines are ignored, and Windows uses the COM port's modem-status signaling lines. AC and battery status are received from the UPS using two of these lines, and a third line, the DTR signal, goes from the computer to the UPS. This signal can tell the UPS to turn itself off when Windows XP Professional has finished shutting down. This capability helps extend the life of the UPS batteries by avoiding a full discharge. If your UPS isn't listed among those supported and you don't have Windows XP-compatible drivers you can install, Windows XP Professional doesn't know what your UPS is capable of and how it sends signals to the computer, if at all. When you choose Generic and then choose Custom, you see a Next button. Clicking it brings up the dialog box shown in Figure 30.16. Figure 30.16. Here, you can set custom polarities for a UPS that Windows XP Professional doesn't know how to preconfigure.Assuming the UPS has a serial link to the computer, you can set the port and fill in the blanks as necessary. Turn off all the options if the UPS has no serial link to a COM port. As the dialog box warns, you should consult the manufacturer or manual to ensure the settings are correct. Table 30.6 describes the salient settings in the UPS polarities.
Running a Command When the Power FailsThe UPS Configuration dialog box has an option for running an executable file when a power failure is detected. It is an option only. Warning messages are sent out (assuming those options are supported and turned on) regardless of whether you choose this option. However, you might want to run a specific executable before the computer is shut down. If you use this option, make sure the program or script you choose can execute in 30 seconds or less. Failure to complete execution in 30 seconds jeopardizes the safe shutdown of your Windows computer. Do the following to declare and set up the executable file:
TIP The command file must reside in your %SystemRoot%\System32 folder and have a filename extension, such as .EXE, .COM, .BAT, or .CMD.
To learn more details about the Run As setting, p. 1065. Testing Your UPS ConfigurationTesting your UPS configuration from time to time is wise, just to make sure you aren't let down when a real emergency occurs. Follow these steps to do so:
|