[Nut-upsdev] How do I approach this problem?

Arjen de Korte nut+users at de-korte.org
Thu Nov 13 17:06:24 UTC 2008


Citeren Jeff Cunningham <jeffrey at cunningham.net>:

> Your solution #2 is very clever and could probably be made to work if
> that were my problem. But my BIOSes do have settings that will cause
> them to restart on resumption of power to the computer.  But this is
> what I think is happening in both cases (one a tripplite using nut-ups,
> the other an APS using their software):
>
> 1. Power goes out
> 2. UPS goes on battery power
> 3. UPS monitoring software waits until it thinks battery is about half
> gone then tells both computer and UPS to shut down
> 4. Computer shuts down, thus its last state is "off"
> 5. UPS shuts down.
> 6. Power comes back on.
> 7. UPS comes back on.
> 8. Computer stays down.
>
> Does that make any sense?

If this is your problem, reading the FAQ might help:

  Q: Everything works perfectly during the shutdown, and the UPS comes
     back on, but my system stays off.  What's happening?

  A: Assuming you don't have the problem in the next question, then you
     probably have an ATX motherboard, have APM or ACPI enabled in your
     kernel (assuming Linux here), and are reaching the 'halt' at the
     bottom of your shutdown scripts.

     Your machine obeys and shuts down, and stays down, since it
     remembers the 'last state' when the UPS restarts.

     One solution is to change your shutdown scripts so you never reach
     that point.  You *want* the system to die without reaching the
     part where the kernel tells it to shut down.  A possible script
     might look like this:

	# other shutdown stuff here (mount -o remount,ro ...)

	if (test -f /etc/killpower)
	then
		/usr/local/ups/bin/upsdrvctl shutdown

		sleep 600	# this should never return

		# uh oh, we never got shut down! (power race?)
		reboot
	fi

	halt -p

     The other solution is to change your BIOS setting to "always power
     on" instead of "last state", assuming that's possible.

Best regards, Arjen
-- 
Please keep list traffic on the list



More information about the Nut-upsdev mailing list