[Nut-upsuser] Nut fsd command ignored: bcmxcp_usb driver, Powerware 5105 UPS

Kjell Claesson kjell.claesson at epost.tidanet.se
Fri Aug 3 11:31:21 UTC 2007


Hi Stuart,

Looks like you found a bug in the driver.
The driver check the ups.conf shutdown.delay on startup and
initiate a local variable.

So if the driver is running it should work but the fact is that the
driver is stopped and only called with shudown, then it don't set this
variable and that is why the delay is zero.

I have to fix this.

Regards
Kjell

Den Thursday 02 August 2007 23.01.24 skrev Stuart Rackham:
> Many thanks to all who helped out on this one, the problem turned out to
> be a misunderstanding on my part:
>
> The Ubuntu 7.04 /etc/init.d/halt script only initiates the
> /etc/init.d/ups-monitor poweroff command if the shutdown -P (poweroff)
> option is used (or -h with /etc/halt/default set to poweroff) -- I was
> using the shutdown -H (halt) option so /etc/init.d/ups-monitor poweroff
>   never got executed.
>
> A couple of observations regarding the bcmxcp_usb driver and 3105 UPS:
>
> The bcmxcp_usb driver turns the UPS off immediately (at the same time
> the PC is powered off by shutdown) irrespective of the setting of the
> driver 'shutdown_delay' parameter. I'm just guessing that the driver
> forces the UPS off when it's terminated by the dying kernel. The only
> way I could get the driver to observe the 'shutdown_delay' parameter and
> not to turn the UPS off immediately was to execute the 'shutdown.return'
> instant command manually (the 'shutdown.stayoff' command turned off the
> UPS immediately):
>
>    # upscmd -u admin -p mypass pw3105 at localhost shutdown.return
>
> This left the following message in `/var/log/daemon.log`:
>
>    Aug  2 13:33:30 kea bcmxcp_usb[4880]: Going down in 120 sec
>
>
> Cheers, Stuart
>
> Arnaud Quette wrote:
> > 2007/7/26, Stuart Rackham <srackham at methods.co.nz>:
> >> Hi
> >>
> >> I'm having a  problem with the bcmxcp_usb driver FSD command: everything
> >> seems to work apart from:
> >>
> >>    upsmon -c fsd
> >>
> >> Environment: Ubuntu 7.04, nut 2.0.5-1, nut-usb 2.0.5-1, Powerware 3105
> >> UPS.
> >>
> >> upsd appears to send the FSD command to the UPS, upsmon then runs my
> >> NOTIFYCMD (which halts my PC) but the UPS just doesn't turn off.
> >> Here are the /var/log/daemon.log entries:
> >>
> >> Jul 24 23:13:16 kea upsmon[5226]: Signal 10: User requested FSD
> >> Jul 24 23:13:16 kea upsd[5223]: Client monuser at 127.0.0.1 set FSD on UPS
> >> [pw3105]
> >> Jul 24 23:13:16 kea upsmon[5226]: Executing automatic power-fail
> >> shutdown Jul 24 23:13:16 kea upsmon[5226]: Auto logout and shutdown
> >> proceeding Jul 24 23:13:21 kea upsd[5223]: Host 127.0.0.1 disconnected
> >> (read failure)
> >>
> >> Jul 24 23:13:28 kea upsd[5223]: Signal 15: exiting
> >>
> >> I might have suspected the UPS or USB interface/cable if not for the
> >> fact that the shutdown.stayoff instant command works -- turns ups off
> >> immediately and that notifications are returned from the UPS.
> >>
> >> The bcmxcp_usb driver reports the following status:
> >>
> >> # upsc pw3105 at localhost
> >> driver.name: bcmxcp_usb
> >> driver.parameter.port: auto
> >> driver.parameter.shutdown_delay: 120
> >> driver.version: 2.0.5
> >> driver.version.internal: 0.11
> >> input.phases: 1
> >> ups.firmware: 00.80
> >> ups.model: POWERWARE UPS    500VA
> >> ups.power.nominal: 500
> >> ups.serial:
> >> ups.status: OL
> >> ups.voltage.nominal: 240
> >>
> >> One peculiarity -- even though the test.battery.start instant command
> >> is listed it puts this in the log:
> >>
> >> Jul 24 23:08:11 kea bcmxcp_usb[5221]: [test.battery.start] not supported
> >>
> >> Any help would be appreciated.
> >
> > Debian, and derivatives such as Ubuntu, declares a generic handler in
> > the halt script:
> >        # See if we need to cut the power.
> >        if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ]
> >        then
> >                /etc/init.d/ups-monitor poweroff
> >        fi
> >
> > This works for nut and apcupsd...
> > now, I've asked a long time ago to have libusb in /lib (instead of
> > /usr/lib) just to be sure that the lib is still reachable at shutdown
> > time (otherwise, the driver wouldn't ever fire up!)
> >
> > the strange point is that we have validated it again this week (a new
> > MGE PSP release is underway) on Ubuntu (dapper and feisty), using nut
> > 2.2.0 and it (the UPS shutoff / poweroff) worked! But I admit there
> > might be an upstart (the init replacement) specific out there...
> >
> > Is the shutoff working otherwise (ie calling upsdrvctl -k (CAUTION: no
> > sensitive load on the UPS; only light bulbs or alike))?
> >
> > A (temporary) workaround, if your unit provide a sufficient delay, is
> > to have the SHUTDOWNCMD in upsmon.conf pointing to a script calling
> > upsrw / upscmd to launch the delayed shutdown with enough time to
> > shutdown the system, and then call the shutdown / halt / whatever
> > command...
> >
> > Arnaud
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser





More information about the Nut-upsuser mailing list