Athough this should not be necessary, as an extra precaution, you can shut-
down your machine, remove the plug from the UPS you are testing, and
plug your machine into another UPS or directly into the wall. Doing so,
will ensure that the UPS doesn’t cut the power to your machine at a bad
time. Remember at the end of the testing to plug your machine back into
the UPS.
You can also minimize the risk from an unexpected shutdown by using a
journaling filesystem such as Linux’s EXT3. All modern disk drives park
themselves safely when they power down, rather than ploughing up oxide on
your disk’s recording surface. Thus, unexpected power less has to hit very
narrow timing windows in order to trash an EXT3 transaction.
To begin the test, pull the power plug from the UPS. The first time that
you do this, psychologically it won’t be easy, but after you have pulled the
plug a few times, you may even come to enjoy it. If all goes well, apcupsd
should detect the power failure and print several warning messages. The
first should appear after 5 to 6 seconds and read:
Warning power loss detected.
Then generally 6 seconds later, apcupsd is sure that it isn’t a transient effect,
so it sends:
Power failure. Running on UPS batteries.
After a few more seconds (total around 15 seconds), plug the power cord
back in and ensure that apcupsd is aware that the power has returned. It
should print:
Power has returned...
If you do not observe the above messages, please correct the situation before
proceeding. The most likely cause of problems are:
• apcupsd doesn’t recognize the power failure because the configuration
directives are not correct. E.g. wrong cable.
• The file /etc/apcupsd/apccontrol doesn’t exist or is not marked as
executable.
65