<span style="background-color:rgb(255,255,255)">Hi!</span><div>Excuse me by the delay. <span style="background-color:rgb(255,255,255)">I did on vacation, last days.</span><div><span style="background-color:rgb(255,255,255)"><span class="hps" style="font-family:arial,sans-serif">I installed</span><span style="font-family:arial,sans-serif"> (I did compile from the sources) </span><span class="hps" style="font-family:arial,sans-serif">the</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">2.6.3</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">version</span><span class="" style="font-family:arial,sans-serif">, but</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">the results</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">are very similar to previous version.</span></span></div>
<div><span style="background-color:rgb(255,255,255)"><span class="hps" style="font-family:arial,sans-serif">I don't see no</span><span style="font-family:arial,sans-serif"></span><span class="hps" style="font-family:arial,sans-serif">ups.delay.shutdown</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">variable</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">to</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">the output of the</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">upsc command</span><span class="" style="font-family:arial,sans-serif">.</span><span style="font-family:arial,sans-serif"> </span></span></div>
<div><span style="background-color:rgb(255,255,255)"><span class="hps" style="font-family:arial,sans-serif">If I run</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">the command</span><span style="font-family:arial,sans-serif"> "</span><span class="hps" style="font-family:arial,sans-serif">upsrw</span><span style="font-family:arial,sans-serif"> </span><span class="hps" style="font-family:arial,sans-serif">server",</span><span style="font-family:arial,sans-serif"> give me:</span></span></div>
<div><span style="background-color:rgb(255,255,255)"><span class="hps"><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">[root@cata-021 ups]# upsrw server</font></div><div><font face="arial, sans-serif">[outlet.1.delay.shutdown]</font></div>
<div><font face="arial, sans-serif">Interval to wait before shutting down this outlet (seconds)</font></div><div><font face="arial, sans-serif">Type: STRING</font></div><div><font face="arial, sans-serif">Value: -1</font></div>
<div><span style="font-family:arial,sans-serif">[outlet.1.delay.start]</span></div><div><font face="arial, sans-serif">Interval to wait before restarting this outlet (seconds)</font></div><div><font face="arial, sans-serif">Type: STRING</font></div>
<div><font face="arial, sans-serif">Value: 60</font></div><div><span style="font-family:arial,sans-serif">[outlet.2.delay.shutdown]</span></div><div><font face="arial, sans-serif">Interval to wait before shutting down this outlet (seconds)</font></div>
<div><font face="arial, sans-serif">Type: STRING</font></div><div><font face="arial, sans-serif">Value: -1</font></div><div><span style="font-family:arial,sans-serif">[outlet.2.delay.start]</span></div><div><font face="arial, sans-serif">Interval to wait before restarting this outlet (seconds)</font></div>
<div><font face="arial, sans-serif">Type: STRING</font></div><div><font face="arial, sans-serif">Value: 60</font></div><div style="font-family:arial,sans-serif"><br></div></span></span></div><div><span class="hps" style="background-color:rgb(255,255,255);font-family:arial,sans-serif">I need</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"> </span><span class="hps" style="background-color:rgb(255,255,255);font-family:arial,sans-serif">to</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"> test the </span><span class="hps" style="background-color:rgb(255,255,255);font-family:arial,sans-serif">debug</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"> </span><span class="hps" style="background-color:rgb(255,255,255);font-family:arial,sans-serif">you suggested</span><span class="" style="background-color:rgb(255,255,255);font-family:arial,sans-serif">, but</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"> </span><span class="hps" style="background-color:rgb(255,255,255);font-family:arial,sans-serif">I need wait to</span><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif"> </span><span class="hps" style="background-color:rgb(255,255,255);font-family:arial,sans-serif">the users don't using the hosts</span><span class="hps" style="background-color:rgb(255,255,255);font-family:arial,sans-serif">.</span></div>
<div><font color="#333333" face="arial, sans-serif" size="3"><br></font><div class="gmail_quote">2012/1/23 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/20 Jorge Infante <<a href="mailto:joluinfante@gmail.com">joluinfante@gmail.com</a>>:<br>
<div class="im">> Ok, Arnaud. Thanks for your response.<br>
><br>
> My powerware is 9120 (I did a mistake with the model of ups).<br>
> I'm using openfiler ESA 2.99.1 (64 bits version)<br>
> I'did compile the nut from sources. I'm using nut 2.4.1.<br>
<br>
</div>if you can, you should try the latest 2.6.3. There is a few<br>
improvements and fixes that have happen since 2.4.1 on this driver...<br>
<div class="im"><br>
> My configuration files:<br>
><br>
> [root@myhost etc]# more upsd.conf<br>
> ACL all <a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a><br>
> ACL localhost <a href="http://127.0.0.1/32" target="_blank">127.0.0.1/32</a><br>
> ACCEPT localhost<br>
> REJECT all<br>
><br>
> [root@myhost etc]# more upsd.users<br>
> [admin]<br>
>         password = xxxxxxxxxxx<br>
>         actions = SET<br>
>         instcmds = ALL<br>
><br>
> [root@myhost etc]# more ups.conf<br>
> [server]<br>
> #driver = megatec<br>
> #driver = liebert-hid<br>
> #driver = liebert<br>
> #driver = usbhid-ups<br>
> #port = auto<br>
> driver = bcmxcp_usb   ------------> I can't use usb with another driver<br>
<br>
</div>bcmxcp_usb is indeed the right driver for your unit.<br>
<br>
> port = /dev/usb8<br>
<br>
setting port to "auto" should be sufficient.<br>
<div><div class="h5"><br>
> shutdown_delay = 120 -----------> This parameter is ignored<br>
><br>
> [root@myhost etc]# more upssched.conf<br>
> CMDSCRIPT /scripts/upssched.sh<br>
> PIPEFN /scripts/upssched.pipe<br>
> LOCKFN /scripts/upssched.lock<br>
> AT ONBATT * START-TIMER onbattwarn 180<br>
> AT ONBATT * EXECUTE upsonbatt<br>
> AT ONLINE * CANCEL-TIMER onbattwarn<br>
> AT ONLINE * EXECUTE backonpower<br>
><br>
> [root@myhost etc]# more upsmon.conf<br>
> MONITOR server 1 admin xxxxxxxxxx master<br>
> MINSUPPLIES 1<br>
> SHUTDOWNCMD "/scripts/upsshutdown.sh"<br>
> #NOTIFYCMD "/scripts/upsnotify.sh"<br>
> NOTIFYCMD "/sbin/upssched"<br>
> POLLFREQ 5<br>
> POLLFREQALERT 5<br>
> HOSTSYNC 15<br>
> DEADTIME 15<br>
> RBWARNTIME 43200<br>
> NOCOMMWARNTIME 300<br>
> FINALDELAY 5<br>
> NOTIFYMSG ONLINE   "UPS is back online"<br>
> NOTIFYMSG ONBATT   "UPS is on battery"<br>
> NOTIFYMSG LOWBATT  "UPS has a low battery (if also on battery, it's<br>
> 'critical')"<br>
> NOTIFYMSG FSD      "UPS is being shutdown by the master (FSD = 'Forced<br>
> Shutdown')"<br>
> NOTIFYMSG COMMOK   "Communications established with the UPS"<br>
> NOTIFYMSG COMMBAD  "Communications lost to the UPS"<br>
> NOTIFYMSG SHUTDOWN "The system is being shutdown"<br>
> NOTIFYMSG REPLBATT "The UPS battery is bad and needs to be replaced"<br>
> NOTIFYMSG NOCOMM   "A UPS is unavailable (can't be contacted for<br>
> monitoring)"<br>
> NOTIFYMSG NOPARENT "The process that shuts down the system has died<br>
> (shutdown impossible)"<br>
> NOTIFYFLAG ONLINE   SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG ONBATT   SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG LOWBATT  SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG FSD      SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG COMMOK   SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG COMMBAD  SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG NOCOMM   SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC<br>
><br>
> on upsshutdown.sh, I'm suspending my virtual machines (in another hosts),<br>
> and, at end, I'm executing shutdown of "myhost".<br>
><br>
> [root@myhost scripts]# more upssched.sh<br>
> #!/bin/sh<br>
> export MAILTO="<a href="mailto:myuser@www.com">myuser@www.com</a>"<br>
> case $1 in<br>
>   upsonbatt)<br>
>     echo "En 3 minutos se iniciara el apagado de equipos." | mailx -s "MUNI:<br>
> Corte de luz" ${MAILTO}<br>
>     ;;<br>
>   backonpower)<br>
>     echo "Se cancelo el apagado." | mailx -s "MUNI: Volvio la luz" ${MAILTO}<br>
>     ;;<br>
>   onbattwarn)<br>
>     echo "Hace 3 minutos que no hay luz." | mailx -s "MUNI: Se inicia el<br>
> apagado<br>
> " ${MAILTO}<br>
>     /sbin/upsmon -c fsd <---- This command run the script upsshutdown.sh,<br>
> but don't stop the ups<br>
>     ;;<br>
> esac<br>
><br>
> [root@myhost scripts]# upsc server<br>
> ambient.temperature: 40<br>
> ambient.temperature.high: 40<br>
> battery.charge: 100<br>
> battery.runtime: 2610<br>
> battery.voltage:  54.9<br>
> <a href="http://driver.name" target="_blank">driver.name</a>: bcmxcp_usb<br>
> driver.parameter.pollinterval: 2<br>
> driver.parameter.port: /dev/usb8<br>
> driver.parameter.shutdown_delay: 120<br>
> driver.version: 2.4.1<br>
> driver.version.internal: 0.21<br>
> input.frequency: 50.0<br>
> input.frequency.high: 52<br>
> input.frequency.low: 48<br>
> input.frequency.nominal: 50<br>
> input.transfer.boost.high: 176<br>
> input.transfer.high: 276<br>
> input.transfer.low: 160<br>
> ambient.temperature: 40<br>
> ambient.temperature.high: 40<br>
> battery.charge: 100<br>
> battery.runtime: 2610<br>
> battery.voltage:  54.8<br>
> <a href="http://driver.name" target="_blank">driver.name</a>: bcmxcp_usb<br>
> driver.parameter.pollinterval: 2<br>
> driver.parameter.port: /dev/usb8<br>
> driver.parameter.shutdown_delay: 120<br>
> driver.version: 2.4.1<br>
> driver.version.internal: 0.21<br>
> input.frequency: 50.0<br>
> input.frequency.high: 52<br>
> input.frequency.low: 48<br>
> input.frequency.nominal: 50<br>
> input.transfer.boost.high: 176<br>
> input.transfer.high: 276<br>
> input.transfer.low: 160<br>
> input.transfer.trim.low: 254<br>
> input.voltage: 228<br>
> input.voltage.nominal: 220<br>
> outlet.1.delay.shutdown: -1<br>
> outlet.1.delay.start: 60<br>
> <a href="http://outlet.1.id" target="_blank">outlet.1.id</a>: 1<br>
> outlet.1.status: On<br>
> outlet.2.delay.shutdown: -1<br>
> outlet.2.delay.start: 60<br>
> <a href="http://outlet.2.id" target="_blank">outlet.2.id</a>: 2<br>
> outlet.2.status: On<br>
> output.current:  1.6<br>
> output.current.nominal:  6.8<br>
> output.frequency: 50.0<br>
> output.phases: 1<br>
> output.voltage: 221<br>
> output.voltage.nominal: 220<br>
> ups.beeper.status: enabled<br>
> ups.firmware: Cont:02.05 Inve:02.05<br>
> ups.load:  22.9<br>
> ups.model: PW9120 1500VA<br>
> ups.power: 344<br>
> ups.power.nominal: 1500<br>
> ups.serial: RY095A0163<br>
> ups.status: OL<br>
><br>
> [root@myhost scripts]# upscmd -l server<br>
> Instant commands supported on UPS [server]:<br>
> outlet.1.shutdown.return - Description unavailable<br>
> outlet.2.shutdown.return - Description unavailable<br>
> shutdown.return - Turn off the load and return when power is back<br>
> shutdown.stayoff - Turn off the load and remain off<br>
> test.battery.start - Start a battery test<br>
><br>
> [root@myhost scripts]# upsrw -s ups.delay.shutdown=120 -u admin -p<br>
> xxxxxxxxxx server<br>
> Unexpected response from upsd: ERR VAR-NOT-SUPPORTED<br>
<br>
</div></div>you can obtain the list of supported settings using:<br>
<br>
$ upsrw server<br>
<div class="im"><br>
> I'm starting the nut with:<br>
><br>
>         upsdrvctl -u root -D start<br>
>         upsd -D -u root &<br>
<br>
</div>FYI: running upsd in debug mode (Ie '-D') prevent it from writing its pid file.<br>
<div class="im"><br>
>         pidof_upsd >/var/state/ups/upsd.pid<br>
>         upslog -s server -u root -l /var/log/ups.log<br>
>         pidof_upslog >/var/state/ups/upslog.pid<br>
>         upsmon -u root -p<br>
<br>
</div>the need to run nut components as root could be avoided if the pid and<br>
run directories exist and have a mode of 750 at least, and root:nut<br>
(or the 'nut' equivalent username)<br>
<div class="im"><br>
> I'm not using the nut provided for openfiler, because is not working with my<br>
> ups.<br>
> I did replace all programs for my version compiled from sources.<br>
> I'm thinking the command "/sbin/upsmon -c fsd" is used for the poweroff<br>
> (waiting to delay in the ups).<br>
><br>
> Well. If you need more information, please email me.<br>
> I'm specting about ideas.<br>
<br>
</div>I'm still interested in understanding where nut 'powerdown' is called.<br>
it's generally the task of /etc/init.d/halt, which calls this final action.<br>
and the nut script should check for 'upsmon -K' return code<br>
(EXIT_SUCCESS or EXIT_FAILURE) to see if calling 'upsdrvctl shutdown'<br>
is needed.<br>
<br>
I would also be interested in the following test:<br>
- power down your system, and remove it from the UPS (to be sure not<br>
to crash your computer during the tests)<br>
- replace your computer by a light bulb or equivalent,<br>
- restart everything,<br>
- start on the nut driver (stop nut if necessary) in debug mode. Ie:<br>
$ /path/to/bcmxcp_usb -DDDDD -a upsname<br>
- now call the 'shutdown.return' command,<br>
<br>
$ upscmd -u admin -p xxxxxxxxxx server shutdown.return<br>
<br>
- when done, stop the driver (Ctrl+C) and send me back the driver debug output.<br>
<div class="HOEnZb"><div class="h5"><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>
<br>
<br>
> 2012/1/20 Arnaud Quette <<a href="mailto:aquette.dev@gmail.com">aquette.dev@gmail.com</a>><br>
>><br>
>> Hi Jorge,<br>
>><br>
>> 2012/1/19 Jorge Infante <<a href="mailto:joluinfante@gmail.com">joluinfante@gmail.com</a>>:<br>
>> > 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<br>
>> > 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<br>
>> > daemon<br>
>> > did poweroff the ups without problems.<br>
>> > But, now, I have only a openfiler based machine, and the propietary<br>
>> > program<br>
>> > don't run (but, I did find nut to replace it).<br>
>> > Can any help me?<br>
>><br>
>> 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>
>> --<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>
><br>
</div></div></blockquote></div><br></div></div>