[Nut-upsuser] UPS Shutdown

Jeff Bowman
Thu, 06 Oct 2016 02:59:11 -0000

> > How does this work in conjunction with the UPS hardware? Does NUT
> > immediately send a command to the UPS to wait for 300 seconds and then
> > shut itself down, thereby allowing the server enough time to safely
> > shut itself down as well?
>
> Yes.

Very good, thank you.



> The command is "upsdrvctl shutdown".

That's what I thought, but I get this:

  Can't claim USB device [051d:0003]: libusb0-dll:err [claim_interface]
could not
  claim interface 0, win error: The requested resource is in use.

  Driver failed to start (exit status=1)

I don't know why it thinks I'm trying to start the driver.



> The 300 seconds start when the effect of "upsdrvctl shutdown"
reaches the UPS
> hardware.  See the diagrams at http://rogerprice.org/NUT.html#SYSD_RACE
which
> assume an offdelay of 20 seconds.

That's what I was hoping for. Thank you for the helpful diagram.

I also am not able to get the script specified in NOTIFYCMD to run when
NOTIFYFLAG ONBATT EXEC is encountered. At this point, being pressed for time, it
looks like I'm going to have to settle for writing a Windows Service that
polls the output of [upsc ups at localhost ups.status] and responds accordingly.
That should get me by for now.