apcupsd is a daemon that can run on a system to communicate and interact with a UPS.
No Linux servers run apcupsd at this time. Supposedly many years ago, when we ran apcupsd, we had many issues with false readings causing unnecessary shutdowns and such, although apcupsd has since introduced an NIS master/slave system which should be much more reliable.
One possible action of apcupsd on a Linux server other than simply shutting down cleanly would be to initiate an AFS fileserver shutdown early during a power outage to reduce the chance of needing to conduct a lengthy salvage of AFS volumes.
Currently apcupsd is in use on all Sun servers. Depending on the server, upon a power outage and after a configured timeout has passed, the server will:
- sync its disks and do nothing
- fully power off
- shutdown to OBP (so it will automatically power on if the UPS dies and then power comes back later)
All of the Sun servers communicate with networked UPSes, of which there are currently six. The general rule currently used for servers that are redundantly connected to two UPSes is that half of the servers connected to the pair will communicate with one UPS, while the other half will communicate with the other. The benefit of this is that if TJ experiences a partial power outage affecting only one of the two UPSes in the redundant pair, only half of the machines will believe it is a true power outage and shutoff (also preventing an overload situation on the other UPS after the first UPS is drained if the overall load was above 50%). If we know that one UPS in the pair can fully support the load, it is also possible to suppress the automated shutdown by killing apcupsd on the affected servers, or by disconnecting the network from the UPS that has lost line power (if the server loses communication with its UPS, it will fall back to the default assumption of online).
In the event that a system's UPS is not networked, that system can be
- directly connected to the UPS via serial or USB and then use apcupsd's NIS master/slave setup (reportedly much more reliable than the previous master/slave system used in older versions) to make sure other systems on that UPS also get status notifications about the UPS through the directly connected machine.
- configured to query another networked UPS that it is not powered from. If this option is picked, try to pick a UPS that is on the same circuit or phase (if known) so that a partial outage does not trigger unnecessary shutdowns. For instance, currently the Sun Ultra 45 workstations communicate with the switch UPS since they are plugged into a non-networked UPS that uses the same 120V outlet block (which should mean the same circuit and phase).
Once a long time ago...and then there were no UPSes for workstations!
The music cart Sun Rays are connected via serial to the UPS on the cart. This allows remote querying and control of the UPS as long as the Sun Ray retains a connection to a Sun Ray server, although there currently is no daemon running to constantly monitor these UPSes. It should be possible to configure a secondary daemon to run on a server to monitor these UPSes for battery usage and load to get a sense of how they are being used.