<div dir="ltr"><div>Hi Roger,<br><br></div>reviving this discussion, since we have a Github ticket for 2.7.5:<br><div><div><div class="gmail_extra"><div class="gmail_quote"><a href="https://github.com/networkupstools/nut/issues/293">https://github.com/networkupstools/nut/issues/293</a><br><br>2016-06-05 12:34 GMT+02:00 Roger Price <span dir="ltr"><<a target="_blank" href="mailto:roger@rogerprice.org">roger@rogerprice.org</a>></span>:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-">On Sat, 4 Jun 2016, Charles Lepple wrote:<br>
<br>
</span><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span class="gmail-">
On Jun 3, 2016, at 6:48 AM, Roger Price <<a target="_blank" href="mailto:roger@rogerprice.org">roger@rogerprice.org</a>> wrote:<br>
</span><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
... the timer.  I don't see it in /var/lib/ups where the locate tool finds upsd.pid, and I don't see it in /run or /var/run where I see upsmon.pid.<br>
<br>
</blockquote>
... it seems that the timers are only stored in memory. See checktimers(): <a target="_blank" rel="noreferrer" href="https://github.com/networkupstools/nut/blob/master/clients/upssched.c#L129">https://github.com/networkupst<wbr>ools/nut/blob/master/clients/<wbr>upssched.c#L129</a><br>
</blockquote>
<br>
Hello Charles, thanks for the link.  If timers are only stored in memory then the example given at <a target="_blank" rel="noreferrer" href="http://networkupstools.org/docs/user-manual.chunked/ar01s07.html">http://networkupstools.org/doc<wbr>s/user-manual.chunked/ar01s07.<wbr>html</a> chapter 7.2 is wrong.  It is not possible to turn off a timer with rm as shown in<br>
<br>
        #! /bin/sh<br>
        case $1 in<br>
                ...<br>
                ups-back-on-power)<br>
                        /bin/rm -f /some/path/ups-on-battery<br>
                        ;;<br>
                ...<br>
        esac<br>
<br>
This would explain the problem I have with a current script.<br></blockquote><div><br></div><div>I've made some additions to clarify things on the timer, and complete the script:<br><a href="https://github.com/networkupstools/nut/compare/upssched-doc?expand=1">https://github.com/networkupstools/nut/compare/upssched-doc?expand=1</a><br></div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">
Is there some other way of forcing routine cancel_timer from a script or a configuration file?<span class="gmail-HOEnZb"></span><br></blockquote></div><br></div><div class="gmail_extra">this is the last point to address, but I'd need to better understand prior to potentially taking action:<br></div><div class="gmail_extra">theoretically, each event that triggers a timer (like ONBATT) has a counterpart to cancel it (like ONLINE).<br></div><div class="gmail_extra">Ex (from the doc): <br clear="all"></div><div class="gmail_extra">    AT ONBATT * START-TIMER onbattwarn 30<br>    AT ONLINE * CANCEL-TIMER onbattwarn<br><br></div><div class="gmail_extra">So is there any use case we're missing here?<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks and cheers,<br></div><div class="gmail_extra">Arno<br></div><div class="gmail_extra">-- <br><div class="gmail_signature">Eaton Data Center Automation Solutions - Opensource Leader - <a target="_blank" href="http://42ity.org">http://42ity.org</a><br>NUT (Network UPS Tools) Project Leader - <a target="_blank" href="http://www.networkupstools.org">http://www.networkupstools.org</a><br>Debian Developer - <a target="_blank" href="http://www.debian.org">http://www.debian.org</a><br>Free Software Developer - <a target="_blank" href="http://arnaud.quette.fr">http://arnaud.quette.fr</a><br></div>
</div></div></div></div>