<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 13, 2014, at 10:22 AM, Stoycho Ganev wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div><p>Hi!</p><p>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?</p></div></blockquote><div><div>A generic way would be to have upsmon signal upssched, and run the shutdown command when upssched gets the OB signal:</div></div><div><br></div><div><a href="http://www.networkupstools.org/docs/man/upsmon.html">http://www.networkupstools.org/docs/man/upsmon.html</a></div><div><br></div><div><a href="http://www.networkupstools.org/docs/man/upssched.html">http://www.networkupstools.org/docs/man/upssched.html</a></div><div><br></div><div>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.</div><blockquote type="cite"><div><p>I'm using an old battery and by the time it reaches LB state, it's already too late for a clean shutdown.</p><p>Another solution would be to change the LB percentage. It currently reads (upsc):</p><p>battery.charge.low: 10</p><p>Is there a way to raise that to, say, 40 or 50 percent?</p><div><br></div></div></blockquote>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.</div><div><br></div><div><a href="http://www.networkupstools.org/docs/man/upsrw.html">http://www.networkupstools.org/docs/man/upsrw.html</a></div><div><blockquote type="cite"><div><p>The goal is to initiate she shutdown procedure as soon after losing line power as possible.</p><div> <br class="webkit-block-placeholder"></div><p>Thanks!</p><div> <br class="webkit-block-placeholder"></div>
<div>-- <br><p><span style="font-family: arial,helvetica,sans-serif;">- - - - -</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-weight: bold; font-family: arial,helvetica,sans-serif;">Stoycho Ganev</span><br style="font-weight: bold; font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">Linux Administrator</span><br style="font-family: arial,helvetica,sans-serif;"><br style="font-family: arial,helvetica,sans-serif;">EPAY JSC<span style="font-family: arial,helvetica,sans-serif; font-size: small;"><br><br>16 Ivan Vazov st., fl.4<br>Sofia 1000<br>UIC: 131409398<br>tel: (+359 2) 921 08 50<br>fax: (+359 2) 987 91 31<br><br><a href="mailto:s.ganev@datamax.bg">s.ganev@datamax.bg</a><br><a title="ePay.bg" href="https://www.epay.bg/">https://www.epay.bg</a></span><br style="font-family: arial,helvetica,sans-serif;"><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif; font-size: xx-small;"><span style="font-weight: bold; color: #009900;">Please do not print this e-mail unless you really need to!</span><br><br>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.</span></p>
</div>
</div>
_______________________________________________<br>Nut-upsuser mailing list<br><a href="mailto:Nut-upsuser@lists.alioth.debian.org">Nut-upsuser@lists.alioth.debian.org</a><br>http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser</blockquote></div><br><div apple-content-edited="true">
<div>-- </div><div>Charles Lepple</div><div>clepple@gmail</div><div><br></div><br class="Apple-interchange-newline">
</div>
<br></body></html>