By accident I found out that the UPS was shutting the system down. I had to answer the phone and on my return the system was shutdown.
In /var/log/apcupsd.events was the following -
- Code: Select all
2012-11-29 22:42:52 +0000 Power failure.
2012-11-29 22:42:58 +0000 Running on UPS batteries.
2012-11-29 22:50:06 +0000 Reached remaining time percentage limit on batteries.
2012-11-29 22:50:06 +0000 Initiating system shutdown!
2012-11-29 22:50:06 +0000 User logins prohibited
2012-11-29 22:50:06 +0000 apcupsd exiting, signal 15
2012-11-29 22:50:06 +0000 apcupsd shutdown succeeded
This shutdown had taken 8 minutes approx to happen whereas before I was giving up after 4 minutes.
In /etc/apcupsd/apcupsd.conf was -
- Code: Select all
# If during a power failure, the UPS has run on batteries for TIMEOUT
# many seconds or longer, apcupsd will initiate a system shutdown.
# A value of 0 disables this timer.
#
# Note, if you have a Smart UPS, you will most likely want to disable
# this timer by setting it to zero. That way, you UPS will continue
# on batteries until either the % charge remaing drops to or below BATTERYLEVEL,
# or the remaining battery runtime drops to or below MINUTES. Of course,
# if you are testing, setting this to 60 causes a quick system shutdown
# if you pull the power plug.
# If you have an older dumb UPS, you will want to set this to less than
# the time you know you can run on batteries.
TIMEOUT 0
Changing this to -
- Code: Select all
# If during a power failure, the UPS has run on batteries for TIMEOUT
# many seconds or longer, apcupsd will initiate a system shutdown.
# A value of 0 disables this timer.
#
# Note, if you have a Smart UPS, you will most likely want to disable
# this timer by setting it to zero. That way, you UPS will continue
# on batteries until either the % charge remaing drops to or below BATTERYLEVEL,
# or the remaining battery runtime drops to or below MINUTES. Of course,
# if you are testing, setting this to 60 causes a quick system shutdown
# if you pull the power plug.
# If you have an older dumb UPS, you will want to set this to less than
# the time you know you can run on batteries.
TIMEOUT 180
Now testing mains failure again in /var/log/apcupsd.events
- Code: Select all
2012-11-30 14:45:44 +0000 Power failure.
2012-11-30 14:45:50 +0000 Running on UPS batteries.
2012-11-30 14:48:51 +0000 Reached run time limit on batteries.
2012-11-30 14:48:51 +0000 Initiating system shutdown!
2012-11-30 14:48:51 +0000 User logins prohibited
2012-11-30 14:48:52 +0000 apcupsd exiting, signal 15
2012-11-30 14:48:52 +0000 apcupsd shutdown succeeded
It now shutsdown in 3 minutes and I now consider the problem solved. Thanks to everybody who tried to help.