Ok, Arnaud. Thanks for your response.<div><br></div><div>My powerware is 9120 (I did a mistake with the model of ups).</div><div>I'm using openfiler ESA 2.99.1 (64 bits version)</div><div>I'did compile the nut from sources. I'm using nut 2.4.1.</div>
<div><br></div><div>My configuration files:</div><div><br><div>[root@myhost etc]# more upsd.conf</div><div>ACL all <a href="http://0.0.0.0/0">0.0.0.0/0</a></div><div>ACL localhost <a href="http://127.0.0.1/32">127.0.0.1/32</a></div>
<div>ACCEPT localhost</div><div>REJECT all</div><div><br></div><div><div>[root@myhost etc]# more upsd.users</div><div>[admin]</div><div>        password = xxxxxxxxxxx</div><div>        actions = SET</div><div>        instcmds = ALL</div>
</div><div><br></div><div><div>[root@myhost etc]# more ups.conf</div><div>[server]</div><div>#driver = megatec</div><div>#driver = liebert-hid</div><div>#driver = liebert</div><div>#driver = usbhid-ups</div><div>#port = auto</div>
<div>driver = bcmxcp_usb   ------------> I can't use usb with another driver</div><div>port = /dev/usb8</div><div>shutdown_delay = 120 -----------> This parameter is ignored</div></div><div><br></div><div><div>[root@myhost etc]# more upssched.conf</div>
<div>CMDSCRIPT /scripts/upssched.sh</div><div>PIPEFN /scripts/upssched.pipe</div><div>LOCKFN /scripts/upssched.lock</div><div>AT ONBATT * START-TIMER onbattwarn 180</div><div>AT ONBATT * EXECUTE upsonbatt </div><div>AT ONLINE * CANCEL-TIMER onbattwarn</div>
<div>AT ONLINE * EXECUTE backonpower</div></div><div><br></div><div><div>[root@myhost etc]# more upsmon.conf</div><div>MONITOR server 1 admin xxxxxxxxxx master</div><div>MINSUPPLIES 1</div><div>SHUTDOWNCMD "/scripts/upsshutdown.sh"</div>
<div>#NOTIFYCMD "/scripts/upsnotify.sh"</div><div>NOTIFYCMD "/sbin/upssched"</div><div>POLLFREQ 5</div><div>POLLFREQALERT 5</div><div>HOSTSYNC 15</div><div>DEADTIME 15</div><div>RBWARNTIME 43200</div><div>
NOCOMMWARNTIME 300</div><div>FINALDELAY 5</div><div>NOTIFYMSG ONLINE   "UPS is back online"</div><div>NOTIFYMSG ONBATT   "UPS is on battery"</div><div>NOTIFYMSG LOWBATT  "UPS has a low battery (if also on battery, it's 'critical')"</div>
<div>NOTIFYMSG FSD      "UPS is being shutdown by the master (FSD = 'Forced Shutdown')"</div><div>NOTIFYMSG COMMOK   "Communications established with the UPS"</div><div>NOTIFYMSG COMMBAD  "Communications lost to the UPS"</div>
<div>NOTIFYMSG SHUTDOWN "The system is being shutdown"</div><div>NOTIFYMSG REPLBATT "The UPS battery is bad and needs to be replaced"</div><div>NOTIFYMSG NOCOMM   "A UPS is unavailable (can't be contacted for monitoring)"</div>
</div><div><div>NOTIFYMSG NOPARENT "The process that shuts down the system has died (shutdown impossible)"</div><div>NOTIFYFLAG ONLINE   SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG ONBATT   SYSLOG+WALL+EXEC</div><div>
NOTIFYFLAG LOWBATT  SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG FSD      SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG COMMOK   SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG COMMBAD  SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC</div>
<div>NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG NOCOMM   SYSLOG+WALL+EXEC</div><div>NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC</div></div><div><br></div><div>on upsshutdown.sh, I'm suspending my virtual machines (in another hosts), and, at end, I'm executing shutdown of "myhost".</div>
<div><br></div><div><div>[root@myhost scripts]# more upssched.sh </div><div>#!/bin/sh</div><div>export MAILTO="<a href="mailto:myuser@www.com">myuser@www.com</a>"</div><div>case $1 in</div><div>  upsonbatt)</div>
<div>    echo "En 3 minutos se iniciara el apagado de equipos." | mailx -s "MUNI: Corte de luz" ${MAILTO}</div><div>    ;;</div><div>  backonpower)</div><div>    echo "Se cancelo el apagado." | mailx -s "MUNI: Volvio la luz" ${MAILTO}</div>
<div>    ;;</div><div>  onbattwarn)</div><div>    echo "Hace 3 minutos que no hay luz." | mailx -s "MUNI: Se inicia el apagado</div><div>" ${MAILTO}</div><div>    /sbin/upsmon -c fsd <---- This command run the script upsshutdown.sh, but don't stop the ups</div>
<div>    ;;</div><div>esac</div></div><div><br></div><div><div>[root@myhost scripts]# upsc server </div><div>ambient.temperature: 40</div><div>ambient.temperature.high: 40</div><div>battery.charge: 100</div><div>battery.runtime: 2610</div>
<div>battery.voltage:  54.9</div><div><a href="http://driver.name">driver.name</a>: bcmxcp_usb</div><div>driver.parameter.pollinterval: 2</div><div>driver.parameter.port: /dev/usb8</div></div><div>driver.parameter.shutdown_delay: 120</div>
<div><div>driver.version: 2.4.1</div><div>driver.version.internal: 0.21</div><div>input.frequency: 50.0</div><div>input.frequency.high: 52</div><div>input.frequency.low: 48</div><div>input.frequency.nominal: 50</div><div>
input.transfer.boost.high: 176</div><div>input.transfer.high: 276</div><div>input.transfer.low: 160</div><div>ambient.temperature: 40</div><div>ambient.temperature.high: 40</div><div>battery.charge: 100</div><div>battery.runtime: 2610</div>
<div>battery.voltage:  54.8</div><div><a href="http://driver.name">driver.name</a>: bcmxcp_usb</div><div>driver.parameter.pollinterval: 2</div><div>driver.parameter.port: /dev/usb8</div><div>driver.parameter.shutdown_delay: 120</div>
<div>driver.version: 2.4.1</div><div>driver.version.internal: 0.21</div><div>input.frequency: 50.0</div><div>input.frequency.high: 52</div><div>input.frequency.low: 48</div><div>input.frequency.nominal: 50</div><div>input.transfer.boost.high: 176</div>
<div>input.transfer.high: 276</div><div>input.transfer.low: 160</div><div>input.transfer.trim.low: 254</div><div>input.voltage: 228</div><div>input.voltage.nominal: 220</div><div>outlet.1.delay.shutdown: -1</div><div>outlet.1.delay.start: 60</div>
<div><a href="http://outlet.1.id">outlet.1.id</a>: 1</div><div>outlet.1.status: On</div><div>outlet.2.delay.shutdown: -1</div><div>outlet.2.delay.start: 60</div><div><a href="http://outlet.2.id">outlet.2.id</a>: 2</div><div>
outlet.2.status: On</div><div>output.current:  1.6</div><div>output.current.nominal:  6.8</div><div>output.frequency: 50.0</div><div>output.phases: 1</div><div>output.voltage: 221</div><div>output.voltage.nominal: 220</div>
<div>ups.beeper.status: enabled</div><div>ups.firmware: Cont:02.05 Inve:02.05</div><div>ups.load:  22.9</div><div>ups.model: PW9120 1500VA</div><div>ups.power: 344</div><div>ups.power.nominal: 1500</div><div>ups.serial: RY095A0163</div>
<div>ups.status: OL</div></div><div><br></div><div><div>[root@myhost scripts]# upscmd -l server</div><div>Instant commands supported on UPS [server]:</div><div>outlet.1.shutdown.return - Description unavailable</div><div>
outlet.2.shutdown.return - Description unavailable</div><div>shutdown.return - Turn off the load and return when power is back</div><div>shutdown.stayoff - Turn off the load and remain off</div><div>test.battery.start - Start a battery test</div>
</div><div><br></div><div><div>[root@myhost scripts]# upsrw -s ups.delay.shutdown=120 -u admin -p xxxxxxxxxx server</div><div>Unexpected response from upsd: ERR VAR-NOT-SUPPORTED</div></div><div><br></div><div>I'm starting the nut with:</div>
<div><div><br></div><div>        upsdrvctl -u root -D start</div><div>        upsd -D -u root &</div><div>        pidof_upsd >/var/state/ups/upsd.pid</div><div>        upslog -s server -u root -l /var/log/ups.log</div>
<div>        pidof_upslog >/var/state/ups/upslog.pid</div><div>        upsmon -u root -p</div></div><div><br></div><div>I'm not using the nut provided for openfiler, because is not working with my ups.</div><div>I did replace all programs for my version compiled from sources.</div>
<div>I'm thinking the command "/sbin/upsmon -c fsd" is used for the poweroff (waiting to delay in the ups).</div><div><br></div><div>Well. If you need more information, please email me.</div><div>I'm specting about ideas.</div>
<div><br></div><div>jorge infante</div><div><br></div><div class="gmail_quote">2012/1/20 Arnaud Quette <span dir="ltr"><<a href="mailto:aquette.dev@gmail.com">aquette.dev@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Jorge,<br>
<br>
2012/1/19 Jorge Infante <<a href="mailto:joluinfante@gmail.com">joluinfante@gmail.com</a>>:<br>
<div><div class="h5">> Hi!<br>
> I'm using nut to control a ups powerware 9135.<br>
> All are working, but, in the shutdown, the ups don't poweroff.<br>
> I did check with upsc, and I can't see a ups.delay.shutdown variable to set<br>
> the time of automatic poweroff, when I did complete the shutdown of<br>
> machines.<br>
> Before, I did use a propietary program to work with this ups, and the daemon<br>
> did poweroff the ups without problems.<br>
> But, now, I have only a openfiler based machine, and the propietary program<br>
> don't run (but, I did find nut to replace it).<br>
> Can any help me?<br>
<br>
</div></div>sure, but I'll need some more information:<br>
- which Openfiler version are you using?<br>
- which NUT version and driver (or port of your UPS) are you using?<br>
- any configuration files, and more specifically, upsmon.conf (trimmed<br>
from passwords!),<br>
- upsc/upsrw/upscmd outputs.<br>
<br>
I would also need to see the system halt script (/etc/init.d/halt) or<br>
equivalent on Openfiler, to see how the nut script gets called to<br>
poweroff the UPS.<br>
I've not been able to find the sources, so any pointer to it would be<br>
appreciated.<br>
<br>
cheers,<br>
Arnaud<br>
<span class="HOEnZb"><font color="#888888">--<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>
</font></span></blockquote></div><br></div>