Hi William,<br><br><div class="gmail_quote">2012/1/6 William Seligman <span dir="ltr"><<a href="mailto:seligman@nevis.columbia.edu">seligman@nevis.columbia.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've googled and RTFM'ed, but still can't solve this one. I hope you folks can.<br>
<br>
This affects my entire computer cluster, but let's start simple: I've got a<br>
computer running NUT; OS is Scientific Linux 5.5; kernel 2.6.18-274.12.1.el5xen.<br>
It connects to an APC SMART-UPS via an APC SmartCard using the snmp-ups driver.<br>
It generally works: upsmon will detect if the battery is low (I get an e-mail<br>
message); I can control the UPS, inspect it variables, set variables, issue<br>
commands, and so on.<br></blockquote><div><br>If "On battery" and "Low battery" are both detected, there should be no issue.<br><br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

There's just one thing that does not happen: when the UPS goes critical, the<br>
computer does not shut down. The upsmon daemon does not display any messages,<br>
does not write to the syslog, does not send e-mail, etc.; even though I've<br>
configured it to do so in upsmon.conf.<br>
<br>
I've tried nut-2.2.2, nut-2.4.3, and nut-2.6.2, and the symptom is the same.<br></blockquote><div><br>Using the latest version, when possible, is always a good idea.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

I tried issuing a "graceful reboot" command via the APC SmartCard's web and<br>
telnet interface. It made no difference; the system still did not shut down.<br>
<br>
Now let's extend the problem to my cluster: I have a variety of different<br>
computers, all running Scientific Linux 5.5, connecting through different<br>
switches, connecting to different flavors of APC SMART-UPSes, via SmartCards,<br>
each ranging in age from six months to five years. They all exhibit this same<br>
symptom, as I painfully discovered during a recent power outage: they all sent<br>
me e-mail when the UPSes went to low battery, but none turned off when the UPS<br>
went critical. Given the range of hardware involved, this must be a common<br>
software problem.<br>
<br>
The systems will shut down properly if I do "upsmon -c fsd", so it doesn't<br>
appear to be a permissions problem.<br>
<br>
I don't think this is the upsdrv_shutdown() issue described in the snmp-ups man<br>
page; I do not care if the UPS shuts down when the computer does, nor do I want<br>
it to. I just want upsmon to shut down the system when the UPS goes critical.<br>
<br>
Here are my config files; the system is tanya, its UPS is tanya-ups. Any advice?<br>
<br>
ups.conf:<br>
<br>
[tanya-ups]<br>
        driver = snmp-ups<br>
        port = tanya-ups<br>
        community = private<br>
        mibs = apcc<br>
<br>
upsd.conf:<br>
<br>
# LISTEN 0.0.0.0 3493<br>
<br>
upsd.users:<br>
<br>
[admin]<br>
        password = nowayjose<br>
        actions = SET<br>
        instcmds = all<br>
        upsmon master<br></blockquote><div><br>it's also a good idea to separate monitoring and administrative users.<br>Ie:<br>[admin]<br>
        password = XXX<br>
        actions = SET<br>
        instcmds = all<br><br>[monuser]<br>

        password = XXX<br>
        upsmon master<br><br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
upsmon.conf:<br>
<br>
MONITOR tanya-ups@localhost 1 admin nowayjose master<br>
MINSUPPLIES 1<br>
SHUTDOWNCMD "/sbin/shutdown -h +0"<br>
NOTIFYCMD /home/bin/notify.sh # sends me e-mail<br>
POLLFREQ 5<br>
POLLFREQALERT 5<br>
HOSTSYNC 15<br>
DEADTIME 15<br>
POWERDOWNFLAG /etc/killpower<br>
NOTIFYFLAG ONLINE       SYSLOG<br>
NOTIFYFLAG ONBATT       SYSLOG+WALL<br>
NOTIFYFLAG LOWBATT      SYSLOG+WALL<br>
NOTIFYFLAG FSD          SYSLOG+WALL+EXEC<br>
NOTIFYFLAG COMMOK       SYSLOG<br>
NOTIFYFLAG COMMBAD      SYSLOG<br>
NOTIFYFLAG SHUTDOWN     SYSLOG+WALL+EXEC<br>
NOTIFYFLAG REPLBATT     SYSLOG+WALL+EXEC<br>
NOTIFYFLAG NOCOMM       SYSLOG<br>
NOTIFYFLAG NOPARENT     SYSLOG+WALL<br>
RBWARNTIME 43200<br>
NOCOMMWARNTIME 300<br>
FINALDELAY 5<span class="HOEnZb"></span><br></blockquote></div><br>Your config seems fine.<br>An interesting test to do would be to stop upsmon, but keep snmp-ups and upsd, then discharge your UPS and to ensure that you indeed get an ups.status == "OB LB", which triggers the call to upsmon.conf->SHUTDOWNCMD.<br>
Note that you need both "OB" and "LB", since you may have "low battery" and be "online" at the same time!<br clear="all"><br>cheers,<br>Arnaud<br>-- <br>Linux / Unix Expert R&D - Eaton - <a href="http://powerquality.eaton.com" target="_blank">http://powerquality.eaton.com</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/" target="_blank">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br><br>