[Nut-upsuser] timers and their usage

Mike Pepe lamune at doki-doki.net
Wed Sep 14 01:12:47 UTC 2005

No, it's set to:

# NOTIFYCMD <command>
NOTIFYCMD /etc/ups/notify.sh

Steven Schoch wrote:
> Did you set NOTIFYCMD in upsmon.conf to upssched?
> In upsmon.conf, the NOTIFYFLAG lines can include SYSLOG, WALL, EXEC.  If 
> you still have WALL set, then upsmon will notify you.  Instead, what you 
> want is for upsmon to call upssched, which does the timer, then calls 
> the program specified as CMDSCRIPT, which has a case line that includes 
> onbattwarn.
> This is a good use for the "else" argument to the "AT" command.  I 
> wanted upssched to notify me, via email to a pager, that the power had 
> been off for over 30 seconds, and then notify me when the power had been 
> restored.  The problem was that if the power was off for less thon 30 
> seconds I still got the "power restored" message.  So I added the "else" 
> argument in upssched.conf so that it runs the "power restored" command 
> only if the timer was no longer running.

That sounds similar to what I'd like to do. Perhaps I could take a peek 
at your config for that scenario?


More information about the Nut-upsuser mailing list