I have an APC UPS with all my computer peripherals plugged into it. When I'm done using the computer, I'd like to be able to type "shutdown" or "init 0" and walk away from the machine, trusting that it will shut down cleanly and then signal the UPS to shut off power to all peripherals.

I understand that there is a "kill the power" signal that APC UPSes can be sent, and I have that working in the event of a power failure: apcupsd will shut down the computer and, at the last moment, tell the UPS to turn off. But this only works when running on battery.

When it gets that killpower signal while running on AC power, the UPS turns off for a few seconds, and then it turns right back on automatically. Is this expected behavior? Can it be disabled, so that the UPS stays off, even when there is AC power?

link|improve this question

25% accept rate
Belongs on Superuser (or maybe Serverfault, but probably Superuser) – Dan Moulding Sep 10 '10 at 18:18
This is not a programming question; bounty refunded. Migrating. – Marc Gravell Sep 11 '10 at 8:53
feedback

migrated from stackoverflow.com Sep 11 '10 at 8:53

This question came from our site for professional and enthusiast programmers.

4 Answers

try nut

link|improve this answer
feedback

Well, perhaps not quite what you asked for, but this is the hardware solution that I use at home: http://www.oneclickpower.com/store/

Plug all the peripherals into this, and they'll turn off when your pc powers down. Keep your ups plugged into the mains obviously.

link|improve this answer
feedback

If the computers are connected via network, your could also think about an other solution. Like sending shutdown command via ssh or so. I have done it this way, with 3 mac systems.

link|improve this answer
This is about signaling to UPS to turn off a single machine (with peripherals) once the machine shuts down. – dbkk101 Sep 9 '10 at 13:40
feedback

The apcupsd on my SuSE box knows the --power-off switch wich will do exactly that. It may require the "smart" protocol, so it may not work on the simpler "Back"-UPS.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.