Re: apcupsd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Nov 06, 2012 at 04:56:20PM -0500, m.roth@xxxxxxxxx wrote:
> Anyone else around using apcupsd? I seem to be seeing a problem, and I'd

Yes

> like someone to check me on it: I edit /etc/apcupsd/apccontrol to replace
> the value of SHUTDOWN from /sbin/shutdown to /bin/false (we don't want 3
> or 6 servers shutting down over a 2 second or so blip, which it really
> wants to do).

It wouldn't normally do that, until the battery is almost drained.

Taken from apcupsd.conf:
  # If during a power failure, the remaining battery percentage
  # (as reported by the UPS) is below or equal to BATTERYLEVEL, 
  # apcupsd will initiate a system shutdown.
  BATTERYLEVEL 5

  # If during a power failure, the remaining runtime in minutes 
  # (as calculated internally by the UPS) is below or equal to MINUTES,
  # apcupsd, will initiate a system shutdown.
  MINUTES 3

Basically, systems shouldn't shutdown with a '2 second blip' unless
your battery is dead.

> it, I found that the config file was set to the original code... and I

apccontrol isn't flagged as a config file in the rpm

  .........    /etc/apcupsd/apccontrol
  .........  c /etc/apcupsd/apcupsd.conf
  .........  c /etc/apcupsd/changeme
  .........  c /etc/apcupsd/commfailure
  .........  c /etc/apcupsd/commok
  .........  c /etc/apcupsd/offbattery
  .........  c /etc/apcupsd/onbattery
  .........  c /etc/logrotate.d/apcupsd
  

> Has anyone seen this behavior?

The script says

# WARNING: the apccontrol file will be overwritten every time you update your
# apcupsd, doing `make install'. Your own customized scripts will _not_ be
# overwritten. If you wish to make changes to this file (discouraged), you
# should change apccontrol.sh.in and then rerun the configure process.

If you can't change apcupsd.conf config to meet your needs then _don't_
change apccontrol; add a custom script that does an "exit 99" to prevent
the shutdown from running.

-- 

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux