[Nut-upsuser] 2.2.2-pre2 64 bit rpm tested on openSUSE 10.3

Arjen de Korte nut+users at de-korte.org
Mon Apr 21 07:16:22 UTC 2008


Roger Price wrote:

>> The better strategy would be to start a upssched timer (I'll call this
>> 'powerout') as soon as the power is lost. If the power returns, cancel the
>> timer and it is business as usual. When the 'powerout' timer elapses after
>> two minutes, you start a second timer (I'll call this one 'delayoff')
>> after sending a message through 'wall' to inform the users that a shutdown
>> is imminent. Again, if the power returns, you cancel the 'delayoff' timer
>> (don't forget an informative 'wall' message) and it is business as usual.
> This looks like a good solution not only for cycle N+1, but also for the 
> first N cycles.  It was laziness on my part to pick the "easy" solution, 
> but it had the advantage of being simple.  Even a noobie like myself can 
> understand it :-)
 >
> But what happens on cycle N+2?   The ideal strategy should also prevent 
> the UPS from powering on the machine if its charge fell below x percent,
> but I've read in this list that it is not reliable to rely on the UPS's 
> declared charge - only true coulomb counting could say what the charge 
> really is.

The only solution here, is in the UPS (but unfortunately, yours doesn't 
have this). If you see something like

	battery.charge.restart: 50

one should be fine. In this case, the UPS won't restart the load until 
the batteries have recharged to at least 50% charge, guaranteeing that 
if the power fails again, there is sufficient battery charge left to 
shutdown the machine cleanly. The problem here, is that this can only be 
done by counting coulombs and you can only reliably do this in the UPS 
itself.

The problem with the reported charge on many UPSes is, that more often 
than not, this is voltage based. This may work reasonably well when 
discharging, but fails miserably if there is no load at all (the voltage 
will be back to the float voltage well before the battery is full again).

> Is it possible to tell a UPS to not send any power to the machine until  
> it has been charging for say three hours?

Some Belkin drivers do if memory serves. But you can do this too by 
looking at the POWERDOWNFLAG *before* starting NUT. If this flag is 
present, the system was shutdown by NUT the last time. If you make sure 
you check this flag (and delay booting) while the filesystems are still 
mounted R/O, this would do the trick.

Best regards, Arjen



More information about the Nut-upsuser mailing list