[Nut-upsuser] Shutdown after 5 minutes?

Rob lists at midsummerdream.org
Wed Sep 6 22:02:28 UTC 2006

Peter Selinger wrote:
> Hi Rob,
> perhaps you should start from the beginning. Did you try any of the
> stuff that I wrote to you about? These were my instructions:

I admit I haven't done these steps yet as I was hoping to logic my way 
through it because doing this test would entail shutting down everything 
attached to the UPS and what not.  I apologize for that.  I'll get to it 
this weekend though, and post the results.

> No shutdown scripts are mentioned up to this point. We cannot know for
> certain what the problem is unless you actually perform these
> experiments, and let us know the results. 

True, but it doesn't make my statement about the confusion I have 
regarding upsmon, upssched, and shutdown scripts any less true. :) 
Granted, that's probably a different discussion than the current one. 
I'll post the results from the tests this weekend.


>> Peter Selinger wrote:
>>> Rob wrote:
>>>> What would I be looking for that I didn't see in my testing with my 
>>>> windows box?  Should I be trying to sniff the serial connection to see 
>>>> if the UPS is for some reason sending a weird signal that NUT is 
>>>> mis-interpreting?  If so, how would you recommend I do that?
>>> I would try the following: plug your computer into a wall outlet, plug
>>> a desk lamp into the UPS. First, start the driver and upsd (but not
>>> upsmon). Monitor the ups variables with upsc. Pull the power, wait 5
>>> minutes or more, see what happens. Are there changes to ups.status?
>>> Does the lamp go off? Normally, the lamp should not go off until the
>>> battery runs out, which should happen some time after ups.status shows
>>> "LB" (low battery). If the lamp goes off before that, there's a
>>> problem. 
>>> Then try the same thing again, this time with upsmon running. When the
>>> UPS gets to "LB", then upsmon should start slowly shutting down the
>>> computer. When the computer is in a safe state, the lamp should go off
>>> (the computer will stay on, as it doesn't know it is not plugged into
>>> the UPS). 
>>> It could be that something is misconfigured in your shutdown scripts,
>>> for example, perhaps you call "upsdrvctl shutdown" way too early. This
>>> would yank the power from your UPS. In the above setup, you would see
>>> the lamp go off as the computer is preparing to shut down. 
>>> -- Peter
>>>> Peter Selinger wrote:
>>>>> That is very odd indeed. Why should the system shut off abruptly? If
>>>>> the log shows nothing, then it seems that the UPS just turned off the
>>>>> power. 
>>>>> I recommend testing this while attaching, say, a lamp to the UPS,
>>>>> instead of a computer. (You can still use your computer to monitor the
>>>>> UPS, just don't plug it into it!)
>>>>> -- Peter
>>>>> Rob wrote:
>>>>>>> Upsmon is responsible for monitoring and reacting to power events.
>>>>>>> See also the man pages for upsmon(8), upsmon.conf(5), upssched(8), and
>>>>>>> upssched.conf(5). 
>>>>>>> There could be many reasons your Windows machine lasts longer than
>>>>>>> your Linux machine on their respective UPSs. Perhaps the battery on
>>>>>>> the second one is older, or has lost some of its charge, or is lower
>>>>>>> quality... Batteries tend to wear out quite easily, especially if they
>>>>>>> are discharged and recharged a few times.
>>>>>>> Did you try switching the two machines?
>>>>>> On my system, I only have 1 UPS and I have monitored it in windows and 
>>>>>> in Linux.  In windows, the same set of systems will properly wait until 
>>>>>> the designated time to shutdown (>5 minutes).  When I boot into Linux, 
>>>>>> my Linux system performs an abrupt poweroff after about 5 minutes.  I 
>>>>>> notice that UPS has been shutoff, but that the system has not been 
>>>>>> shutdown cleanly as the logs do not show a system shutdown and disks 
>>>>>> need to be recovered on bootup.
>>>>>> In windows, I monitored the power output and saw that the battery 
>>>>>> drained very quickly down to 60%, and then stabilized.  I contacted 
>>>>>> CyberPower about this and they stated that this is a normal discharge 
>>>>>> pattern for SLA batteries.  Does NUT possibly detect the power drain 
>>>>>> rate and perform an action based upon that?  Even if the UPS was sending 
>>>>>> a low power indicator, I can't see why NUT wouldn't do a clean shutdown 
>>>>>> of the system?
>>>>>> Rob

More information about the Nut-upsuser mailing list