[CentOS] apcupsd, odd behavior

Devin Reade gdr at gno.org
Sat Feb 16 17:33:05 UTC 2013


Realizing that this thread is a bit old ...

I've used apcupsd for years on a variety of enterprise- and
consumer-class UPSes, on a variety of UNIXes.  When I have seen a
system that reports long battery lifetime in its stats but shuts
down immediately, these are the likely culprits in order of likelihood:

- one of the conf values was tuned down for initial testing and
  never turned up again.  Another poster mentioned MINUTES but
  the one I usually use for testing and have forgotten to change
  is the TIMEOUT value; for testing I would often set it to 60
  but in production it should (on my systems) be zero.  There are
  a few other such parameters in the config file; review them all.

- one or more batteries in your chain is EOL.  Shut down apcupsd
  and initiate the battery test mode.  Batteries will typically
  last not more than 5 years (yes, there is variation both ways)

- your battery runtime is not calibrated and so the stats you're
  seeing are misleading.  This can happen from not being calibrated
  to begin with, from not calibrating after replacing batteries,
  or having batteries deteriorate over time.  See the apcupsd
  docs or mailing list for calibration details.  Note that if
  your load is significantly less than your battery capacity
  (like 15% or similar), calibration will not in general work.

- your UPS is EOL (fairly rare, but I occasionally retire a UPS
  because it no longer behaves in a predictable manner despite
  new batteries)

If that doesn't solve it, I'd suggest taking it to the apcupsd
mailing list.

One thing that *is* more on-topic for CentOS and apcupsd, be aware
that system updates don't clobber the patched /etc/rc.d/init.d/halt
script needed for apcupsd to actually shut down your system.  I 
have a cron job on such systems that looks for the string 'apcupsd'
in that file; if it doesn't exist, an email alert goes out to me
so that I know that I have to re-patch it.

Devin




More information about the CentOS mailing list