[Nut-upsuser] Is a timer a file?

Charles Lepple clepple at gmail.com
Sat Jun 4 14:59:19 UTC 2016

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, Roger

I 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

More information about the Nut-upsuser mailing list