[Nut-upsuser] How do I initiate a shutdown sequence immediately after losing line power?
stoycho at ganev.org
Fri Feb 14 07:51:59 UTC 2014
Using the upsrw command I was able to change the value of
battery.charge.low from 10 to 40, so my problem is solved for now (at
least temporarily, until I get my battery replaced).
Thanks a lot for your help and have a nice day!
- - - - -
16 Ivan Vazov st., fl.4
tel: (+359 2) 921 08 50
fax: (+359 2) 987 91 31
s.ganev at datamax.bg
Please do not print this e-mail unless you really need to!
This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
On 13.02.2014 17:52, Charles Lepple wrote:
> On Feb 13, 2014, at 10:22 AM, Stoycho Ganev wrote:
>> Is there a way to tell upsd to initiate a shutdown sequence (i.e. run SHUTDOWNCMD) immediately after losing line power and switching the state to OB?
> A generic way would be to have upsmon signal upssched, and run the shutdown command when upssched gets the OB signal:
> http://www.networkupstools.org/docs/man/upsmon.html 
> http://www.networkupstools.org/docs/man/upssched.html 
> You may want to look at the timers in upssched; otherwise, you may get false positives if your UPS briefly transitions to OB during a power glitch.
>> I'm using an old battery and by the time it reaches LB state, it's already too late for a clean shutdown.
>> Another solution would be to change the LB percentage. It currently reads (upsc):
>> battery.charge.low: 10
>> Is there a way to raise that to, say, 40 or 50 percent?
> Hard to say without knowing what driver you are using (and even then, it depends on the UPS firmware). But if that variable shows up in the list when you run upsrw, then you should be able to adjust it.
> http://www.networkupstools.org/docs/man/upsrw.html 
>> The goal is to initiate she shutdown procedure as soon after losing line power as possible.
>> - - - - -
>> Stoycho Ganev
>> Linux Administrator
>> EPAY JSC
>> 16 Ivan Vazov st., fl.4
>> Sofia 1000
>> UIC: 131409398
>> tel: (+359 2) 921 08 50
>> fax: (+359 2) 987 91 31
>> s.ganev at datamax.bg
>> https://www.epay.bg 
>> Please do not print this e-mail unless you really need to!
>> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________
>> Nut-upsuser mailing list
>> Nut-upsuser at lists.alioth.debian.org
> Charles Lepple
> clepple at gmail
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nut-upsuser