[Nut-upsuser] upsmon shutdown based on Time since power fail.

Richard Chapman rchapman at aardvark.com.au
Fri May 22 01:07:15 UTC 2009


Thanks Jon

This sounds like one way to do it. If I do it this way - do you know 
whether the file:

/etc/killpower

will be created before the shut-down is issued (as it would if the 
battery low event occurs). If not - the UPS may not be shut down - and 
therefore the system may not start up again if the power returns before 
the battery is completely flat.

I guess if the flag file isn't created - then we could run a short 
script to create it - then issue the shut-down.... Does that sound right 
to you? Indeed - if we do write a short script - we could do the delay 
in the script - somehow test whether we are still on battery - and if so 
- issue the shut-down immediately.

Out of interest - do you know what the ups parameter:

battery.runtime: 120

Means - and where might it be documented?

Thanks Jon


Richard.


Jon Bendtsen wrote:
> On 20/05/2009, at 12.11, Richard Chapman wrote:
>
>> For various reasons - I have been trying to get my Desktops and/or 
>> servers to shut-down a fixed time after a power fail - or better 
>> still a fixed time - or a low battery whichever comes first.
>
> [cuuuuut]
>
>> Is there another parameter somewhere - probably in upsmon - which 
>> would allow me to specify a shut-down after (say) 3 minutes running 
>> on battery regardless of battery status?
>
> In the upsmon.conf file you use NOTIFYCMD and ONBATT to execute a 
> shutdown $time
>
> Then you use a ONLINE to execute a -c to cancel a shutdown if the 
> power returns.
>
>
>
> JonB
>




More information about the Nut-upsuser mailing list