Now when you pull the power plug, and either the timer expires or the
batteries are exhausted (see the next section for more details), the system
should be fully shutdown.
After performing this test, please be sure to restore /etc/apcupsd/apccontrol
to its previous state.
Full Power Down Test
To complete the testing, you should do a power fail shutdown of your system.
This test is applicable to all UPS models. Please do a backup of your system
or take other precautions before attempting this to avoid the possibility of
lost data due to a problem (I have been through this at least 10 times and
never once had problems, but we all know that someday something will go
wrong).
Before proceeding, please ensure that your halt script or the equivalent has
been properly updated by the install process to contain the logic to call
apcupsd --killpower when it detects a power failure situation (the pres-
ence of a /etc/powerfail file). See the Building and Installing apcupsd of
this manual, or the README files for additional details about the halt
modifications necessary.
When you are ready to do the test, either simply pull the plug and wait
for the batteries to become exhausted, or set the TIMEOUT configuration
directive to something like 60 so that the system will shutdown before the
batteries are exhausted. We recommend doing the full shutdown without
using TIMEOUT to correctly simulate a real power failure, but the choice
is yours (I did it once here, but now use TIMEOUT 30).
If all goes well, your system should be shutdown before the batteries are com-
pletely exhausted and the UPS should be powered off by apcupsd. Please
be aware that if you do the full power down, you must ensure that your UPS
is totally powered off. Otherwise, it may have been given the command to
power off, but due to a long grace period it is still waiting. If you were to
reboot your computer during the grace period, the UPS could then suddenly
turn off the power (this happened to me). To avoid this problem, always
wait for your UPS to power itself off, or power if off manually before restart-
ing your computer. On my system, the UPS is configured as at the factory
to have a 180 second grace period before shutting off the power. During
this type of testing, 180 seconds seems like an eternity, so please take care
to either wait or manually power off your UPS. To determine what grace
period is programmed into your UPS EEPROM, run apcaccess eprom and
67