On Feb 13, 2014, at 10:22 AM, Stoycho Ganev wrote:

> Hi!
> 
> 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.
> 
>  
> Thanks!
> 
>  
> -- 
> - - - - -
> 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
> 
> [email protected]
> 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
> [email protected]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

-- 
Charles Lepple
clepple@gmail



_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to