With more and more electronic gadgets surrounding even the normal citizen, power outages don’t mean just the loss of light, it hampers downright the everyday life. To computers lack of electricity can be a severe threat. It’s not only the unsaved work (just from the last couple of minutes, hopefully) that gets killed, it can even take out the system as a whole. – A good backup is then the only possibility to get the data back, but that’s an other story. To mitigate the risk of crushing the hard drive or lose data stored in memory, an alternative power source has to cover the duration of the power outage. For short term powerline replacement, the thing to get is a battery backed UPS (uninterruptible power supply). Picking the right UPS for one’s needs is an art in itself, but the producers usually have a calculator on their web sites. As a general rule of thumb, for workstations the UPS should deliver enough power to be able to shut down the system. For servers the situation is more complicated, since either the reboot process takes very long (e.g. RAID or filesystem checks) or the services provided by the machine are crucial for other systems. Hence the UPS has to guarantee that the whole outage is covered or all dependent systems have come down cleanly before the server is shut down (which has to be completed before the batteries are depleted). But exactly here lies the problem: how can the machine attached to an UPS decide if it’s time to shut down? For single computers attached to a battery backup, the answer is quite trivial, just use the cables that came with the UPS to connect it to the system and install the software. The server scenario described above is more advanced, since it requires the machines to know when and in which order to shut down. The easiest way is a network based communication with a master which is either queried by or pushes the necessary information to the slaves. – Therefore don’t forget to plug the network infrastructure to the UPS too! The next rant will describe the set up of such a system for APC UPSes and FreeBSD machines.