Just to add to the above, APC (in some ways the 'gold standard' at least in terms of reputation for small UPSs) have a mass of configuration options.
Quote:
Not even sure it is possible for the Linux machine to detect when it switches to AUX power.
|
Yesno; the
UPS sends out a message when one of its alarm conditions are met, so the Linux box has just got to listen for the message. The old UPSs that I know have an RS-232 serial link to convey the information to the computer; USB is more modern, but I believe on UPSs that weigh in above the 'two hernia' level, you get a real ethernet port...
So, you need a small utility that listens on the appropriate port for a message an then reacts appropriately. This is where acpupsd comes in. There is also an acpupsd-gui program for tweaking and monitoring which works alongside acpupsd.
Note that with the APC line you can set fixed delays, remaining percentages of power as limits, and you have to be careful with this; it is very easy to think that setting, say, 10% is safe only to find that the time delay gets it to shutdown much earlier.
Also, depending on what this box is doing, think about what is a graceful shutdown. If you have a document open, which may or may not have been modified, what is the graceful action?