Hi, I'm trying to get a better understanding of what a timer is, so I added the following line to upssched.conf # Debug - turn on long-running timer to find out where upssched puts it AT ONBATT * START-TIMER where-am-I 1000 I can then start this timer by pulling the power cord from the wall for just a few seconds. I now have 1000 seconds to find 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. Is a timer a file?, and if it is, where should I find it? Any suggestion would be much appreciated. Thanks, Roger
Just tried 2.7.4 Tripp Lite SMART1300LCD still doesn't work Sent from my LG G3. -----Original Message----- From: Roger Price <roger at rogerprice.org> To: nut-upsuser Mailing List <nut-upsuser at lists.alioth.debian.org> Sent: Fri, 03 Jun 2016 3:48 AM Subject: [Nut-upsuser] Is a timer a file? Hi, I'm trying to get a better understanding of what a timer is, so I added the following line to upssched.conf # Debug - turn on long-running timer to find out where upssched puts it AT ONBATT * START-TIMER where-am-I 1000 I can then start this timer by pulling the power cord from the wall for just a few seconds. I now have 1000 seconds to find 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. Is a timer a file?, and if it is, where should I find it? Any suggestion would be much appreciated. Thanks, Roger _______________________________________________ Nut-upsuser mailing list Nut-upsuser at lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20160603/c731b22e/attachment.html>
On Jun 3, 2016, at 6:48 AM, Roger Price <roger at rogerprice.org> wrote:> > Hi, I'm trying to get a better understanding of what a timer is, so I added the following line to upssched.conf > > # Debug - turn on long-running timer to find out where upssched puts it > AT ONBATT * START-TIMER where-am-I 1000 > > I can then start this timer by pulling the power cord from the wall for just a few seconds.(Incidentally, this sounds like a good use case for the dummy-ups driver - you could just edit the ups.status line in the dump file, and upssched could follow the simulated UPS.)> I now have 1000 seconds to find 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. > > Is a timer a file?, and if it is, where should I find it? Any suggestion would be much appreciated. Thanks, RogerI don't use upssched myself, but from looking at the code, it seems that the timers are only stored in memory. See checktimers(): https://github.com/networkupstools/nut/blob/master/clients/upssched.c#L129 -- Charles Lepple clepple at gmail
On Sat, 4 Jun 2016, Charles Lepple wrote:> On Jun 3, 2016, at 6:48 AM, Roger Price <roger at rogerprice.org> wrote: >> ... 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. >> > ... it seems that the timers are only stored in memory. See > checktimers(): > https://github.com/networkupstools/nut/blob/master/clients/upssched.c#L129Hello Charles, thanks for the link. If timers are only stored in memory then the example given at http://networkupstools.org/docs/user-manual.chunked/ar01s07.html chapter 7.2 is wrong. It is not possible to turn off a timer with rm as shown in #! /bin/sh case $1 in ... ups-back-on-power) /bin/rm -f /some/path/ups-on-battery ;; ... esac This would explain the problem I have with a current script. Is there some other way of forcing routine cancel_timer from a script or a configuration file? Roger