[Nut-upsuser] Belkin USB UPS Not Turning Off
David White
whitedavidp at yahoo.com
Wed Jan 1 19:56:05 GMT 2020
On 1/1/2020 11:49 AM, David White wrote:
>
> Hi Roger and, as always, thanks!
>
> I really do not want to wait very long before shutting down things on
> this UPS. What I think I am doing (or at least trying to do) is to
> execute a script on the host machine when the UPS is detected by NUT to
> be on battery power.
>
> That script sleeps 20 seconds to ensure that this was not just a power
> blip (which happens here often) but a real power outage. After 20
> seconds, the script checks the UPS status via upsc and if it is no
> longer OB, power is deemed restored and the script exits.
>
> If, after 20 seconds, UPS status remains OB then the event is deemed a
> true power outage and I want to shut down what I can cleanly. To do
> this, the script issues remote shutdown commands to a set of network
> connected devices also living on this UPS (but sadly not able to run
> NUT). As its final step, it issues a command to shut the host machine down.
>
> It seems from what you say above, I need to issue "/sbin/upsdrvctl
> shutdown" in there somewhere - obviously before I shut the host machine
> down. I will have to test this to see exactly what that command does.
> When run w/out arguments, the usage says shutdown shuts down UPS
> drivers. I am not clear if this means that the UPS itself will be
> powered off or if simply NUT is shutdown.
>
> Thanks
>
>
Well, I just tried "/sbin/upsdrvctl shutdown" and while I see some
output and a message shutting down in 30 seconds, nothing happens to the
host machine or the UPS. Hmmm.
More information about the Nut-upsuser
mailing list