[Nut-upsuser] NUT 2.6.3, openSUSE 12.2 : UPS unit not switched off

Roger Price roger at rogerprice.org
Fri Oct 26 14:24:08 UTC 2012


Dear List, I'm trying to perform an automatic server shutdown and restart 
with NUT 2.6.3, openSUSE 12.2 and an Eaton Eco 1600.  The server shutdown 
works but there is no automatic restart when wall power returns.  Unlike 
successful tests with earlier versions of openSUSE, the UPS unit is never 
switched off. It goes on beeping for as long as I let it.

When I pulled the plug from the wall socket, after two warnings based on 
timers, the server shut down.  However the UPS unit did not switch off. I 
did not hear the familiar "clunk" after a short wait. Here is the trace of 
the dying minutes in /var/log/messages. There is no message indicating an 
instruction to the UPS unit to switch off.

Oct 25 16:09:46 maria upsmon[3078]: UPS Eaton-66781 at localhost: On battery +++ Onduleur sur batterie
Oct 25 16:09:46 maria upssched[3544]: Timer daemon started
Oct 25 16:09:46 maria upssched[3544]: New timer: ups-on-battery-timer2 (5 seconds)
Oct 25 16:09:46 maria upssched[3544]: New timer: ups-on-battery-timer3 (65 seconds)
Oct 25 16:09:46 maria upssched[3544]: New timer: ups-on-battery-timer4 (125 seconds)
Oct 25 16:09:51 maria upssched[3544]: Event: ups-on-battery-timer2
Oct 25 16:09:51 maria upssched-cmd[3546]: Calling upssched-cmd ups-on-battery-timer2
Oct 25 16:09:51 maria upssched-cmd[3549]: Shutdown timer 2 warning, OB DISCHRG 94%
Oct 25 16:10:51 maria upssched[3544]: Event: ups-on-battery-timer3
Oct 25 16:10:51 maria upssched-cmd[3557]: Calling upssched-cmd ups-on-battery-timer3
Oct 25 16:10:51 maria upssched-cmd[3560]: Shutdown timer 3 warning, OB DISCHRG 90%
Oct 25 16:11:51 maria upssched[3544]: Event: ups-on-battery-timer4
Oct 25 16:11:51 maria upssched-cmd[3564]: Calling upssched-cmd ups-on-battery-timer4
Oct 25 16:11:51 maria upssched-cmd[3567]: Shutdown timer reached: Calling upsmon -c fsd, OB DISCHRG 85%
Oct 25 16:11:51 maria upsmon[3078]: Signal 10: User requested FSD
Oct 25 16:11:51 maria upsd[3074]: Client upsmaster at 127.0.0.1 set FSD on UPS [Eaton-66781]
Oct 25 16:11:51 maria upsmon[3078]: Executing automatic power-fail shutdown
Oct 25 16:11:51 maria upsmon[3078]: Auto logout and shutdown proceeding +++ Arret automatique en cours
Oct 25 16:11:56 maria systemd-shutdow[3573]: Creating /run/nologin, blocking further logins...
Oct 25 16:11:56 maria rsyslogd: [origin software="rsyslogd" swVersion="5.10.0" x-pid="669"
                                 x-info="http://www.rsyslog.com"] exiting on signal 15.

The UPS unit goes on beeping.  When I reconnect to the wall socket, the 
beeping stops, but no server restart.  Yes, the BIOS is set up for 
automatic restart on power return.

I re-ran the test with the upsd -DD debug option.  After editing out a lot 
of repetition, the /var/log/messages trace is 154 lines, visible at 
http://rogerprice.org/upsd-DD.trace . I see no sign of a command to the 
UPS to switch off.

I started a trace of the driver usbhid-ups with the commands

  killall usbhid-ups
  /usr/lib/ups/driver/usbhid-ups -D -a Eaton-66781 >> /tmp/usbhid-ups.trace 2>&1

and then pulled the power plug from the wall, and waited until the server 
had shut down.  This produced 352 lines of trace which you can see at 
http://rogerprice.org/usbhid-ups.trace . There is no sign of an 
instruction to switch off the UPS unit.

My skill as a C programmer is limited to owning a copy of K&R, but looking 
at drivers/usbhid-ups.c, I'm guessing that upsdrv_shutdown should perform 
a shutdown.return to switch off the UPS or return an error message, but 
this doesn't seem to happen.  Am I looking in the right place? Any hint on 
debugging this would be welcome.

Roger



More information about the Nut-upsuser mailing list