[Nut-upsuser] placement of ups shutdown command for snmp systems

lutz.niederer at gmx.net lutz.niederer at gmx.net
Mon May 20 23:23:47 UTC 2013


>> In the shutdown procedure that is initiated via shutdown -h +0 is there any point where the shutdown could be interrupted due to power coming back or is this the final command that always results in the machine being brought down? I looked through the scripts that are involved and found nothing. So my thoughts are that this is a safe place for the ups shutdown command.
>
> I haven't looked at the shutdown procedure recently, but the most common way for an UPS to avoid a race condition when the power comes back is as follows: once the UPS receives the shutdown command from NUT, it will always cut power at the scheduled time, even if only momentarily. If line power has returned, momentarily interrupting the UPS output will break the computer out of its halted state. If not, then the UPS simply powers off the output, and waits for line power to return.
>
> I admit that we haven't kept good records on which UPSes do this, but it is fairly straightforward to test, and it should work on all but the cheapest models.

Hi,
this is exactly what I currently do.
The question is if this nut shutdown script is the right place to put in the shutdown -h +0 or if I should use triggers or fiddle with the scheduler or ... and place it there.
Cheers!
-lutzn



More information about the Nut-upsuser mailing list