Anyone else around using apcupsd? I seem to be seeing a problem, and I'd 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). What's happened is that a machine shut down the other day, and looking at it, I found that the config file was set to the original code... and I *KNOW*, for a fact, that I went through every single server that's attached to a UPS many months ago, after something important shut down, and fixed all of them. So, it looks like an upgrade undid my change, rather than creating apccontrol.rpmnew. Has anyone seen this behavior? mark
On Tue, Nov 06, 2012 at 04:56:20PM -0500, m.roth at 5-cent.us wrote:> Anyone else around using apcupsd? I seem to be seeing a problem, and I'dYes> 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 Iapccontrol 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
On Tue, 6 Nov 2012, m.roth at 5-cent.us wrote:> To: CentOS mailing list <centos at centos.org> > From: m.roth at 5-cent.us > Subject: [CentOS] apcupsd > > Anyone else around using apcupsd? I seem to be seeing a problem, and I'd > 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). > > What's happened is that a machine shut down the other day, and looking at > it, I found that the config file was set to the original code... and I > *KNOW*, for a fact, that I went through every single server that's > attached to a UPS many months ago, after something important shut down, > and fixed all of them. > > So, it looks like an upgrade undid my change, rather than creating > apccontrol.rpmnew.Hi Mark. I've been using apcupsd for years. I'm on Centos 5.8. Don't you mean apcupsd.conf for your configuration settings? That's the one I use to configure apcupsd. Keith ----------------------------------------------------------- Websites: http://www.karsites.net http://www.php-debuggers.net http://www.raised-from-the-dead.org.uk All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------
On 6 Nov 2012, at 21:56, "m.roth at 5-cent.us" <m.roth at 5-cent.us> wrote:> Anyone else around using apcupsd? I seem to be seeing a problem, and I'd > 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).Odd behaviour. I have it running on CentOS 5, OpenBSD and windows and none of these show this behaviour. I installed through yum. What settings do you have on the UPS itself? Are the servers attached to a control group with low priority? Mike
I wrote:>Stephen Harris wrote: >> On Tue, Nov 06, 2012 at 04:56:20PM -0500, m.roth at 5-cent.us wrote: >>> Anyone else around using apcupsd? I seem to be seeing a problem, and I'd ><snip>>> apccontrol isn't flagged as a config file in the rpm<snip>>> The script says > >> # WARNING: the apccontrol file will be overwritten every time youupdate 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.> It looks like you're right... EXCEPT that you missed the part aboutchanging> apccontrol.sh.in, which appears to me to be something you get if you build<snipo> Ok, finally had time to go back and read carefully. And then, with a little googling, saw someone else's reaction as the same as mine: apccontrol has a *lot* of options. Does this mean that I need to write a script names poweroff so that it doesn't shut down, *and* have symlinks to that from loadlimit, runlimit, doreboot, onbattery, failing, and timeout? If so, that's ugly.... mark