[Nut-upsuser] nut UPS kill inverter: offdelay ignored

Charles Lepple clepple at gmail.com
Wed Jul 1 12:46:46 UTC 2015


On Jun 30, 2015, at 11:13 AM, Martin Ivanov <tramni at abv.bg> wrote:

> Dear All,
> 
> I am running Slackware64-14.1(Linux marto 3.10.17 #1 SMP Fri Feb 14 16:39:21 CST 2014 x86_64 Intel(R) Pentium(R) CPU G3250 @ 3.20GHz GenuineIntel GNU/Linux)
> with kernel 3.10.17 and nut package nut-2.6.5-x86_64-1_SBo, buit from source using the build script http://slackbuilds.org/repository/14.1/system/nut/
> 
> In the README.Slackware it is suggested that
> the commands for killing the inverter be placed in certain positions in rc.6 after remounting the root
> file system read only. In my configuration, however, the /usr and /root directories are on
> different partitions, so I added these commands after turning off swap and before unmounting the
> local file systems, like this:
> # rc.6
> ...
> # Turn off swap:
> echo "Turning off swap."
> /sbin/swapoff -a
> /bin/sync
> 
> # Turn off UPS's power
> if [ -x /usr/libexec/nut/nut_restart_udev ]; then
>  . /usr/libexec/nut/nut_restart_udev
> fi
> if [ -x /usr/libexec/nut/nut_kill_inverter ]; then
> . /usr/libexec/nut/nut_kill_inverter

Thanks for the pointer to the Slackware-specific scripts - that is helpful.

/usr/libexec/nut/nut_kill_inverter calls "/etc/rc.d/rc.ups shutdown", which calls "upsdrvctl shutdown". So that part seems reasonable.

If you can power the system from a different UPS or outlet, you can plug a dummy load (like a lamp) into this UPS, and invoke the driver shutdown command directly. This will allow you to see the debug messages.

It will be something like the following:

service stop nut # (or equivalent)
/usr/libexec/nut/usbhid-ups -a Eaton5E650iUSB -DD -k

> fi
> 
> echo "Unmounting local file systems."
> /bin/umount -v -a -t no,proc,sysfs
> ...
> 
> I also set in the ups.conf file that the UPS should be killed 3 minutes after issuing the kill
> inverter command:
> # ups.conf
> [Eaton5E650iUSB]
> driver = usbhid-ups
> port = auto
> desc = "UPS Eaton5E650iUSBDIN"
> offdelay=180
> ondelay=200
> 
> On power failure the shutdown process reaches the kill inverter commands in rc.6,
> issues them and in several seconds shuts down the UPS, obviously ignoring the offdelay setting.
> Furthermore, it does not proceed to issue the remaining rc.6 commands, but seems to hang at shutting down the UPS.

When you say it seems to hang, is this including the 40 and 10 second sleep commands in nut_kill_inverter?

> Do You have any suggestions?
> 
> Thank You very much for Your attention.
> 
> Best regards,
> 
> Martin
> 
> PS: Here is some diagnostic info:
> upsc Eaton5E650iUSB at localhost
> battery.charge: 60
> battery.runtime: 619
> battery.type: PbAc
> device.mfr: EATON
> device.model: 5E 650i
> device.type: ups
> driver.name: usbhid-ups
> driver.parameter.offdelay: 180
> driver.parameter.ondelay: 200
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 2
> driver.parameter.port: auto
> driver.version: 2.6.5-Unversioned directory
> driver.version.data: MGE HID 1.31
> driver.version.internal: 0.37
> input.voltage: 247.0
> outlet.1.status: on
> outlet.desc: Main Outlet
> outlet.id: 1
> outlet.switchable: no
> output.frequency: 49.9
> output.frequency.nominal: 50                                                                                                                                                                                                                
> output.voltage: 246.0                                                                                                                                                                                                                       
> output.voltage.nominal: 230                                                                                                                                                                                                                 
> ups.beeper.status: enabled                                                                                                                                                                                                                  
> ups.delay.shutdown: 180                                                                                 

It looks like the driver recognized the "offdelay" parameter, but there should be a matching "ups.delay.start" variable to match the "ondelay" parameter.

I don't know much about this specific model, so I have CC'd Arnaud at Eaton.

>                                                                                                                                    
> ups.firmware: 02.06.0017                                                                                                                                                                                                                    
> ups.load: 28                                                                                                                                                                                                                                
> ups.mfr: EATON                                                                                                                                                                                                                              
> ups.model: 5E 650i                                                                                                                                                                                                                          
> ups.power.nominal: 650                                                                                                                                                                                                                      
> ups.productid: ffff                                                                                                                                                                                                                         
> ups.start.battery: yes                                                                                                                                                                                                                      
> ups.status: OL CHRG                                                                                                                                                                                                                         
> ups.timer.shutdown: -1                                                                                                                                                                                                                      
> ups.vendorid: 0463
> 
> 
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsuser mailing list