[Nut-upsuser] Timers fireing too early

Justin Piszcz jpiszcz at lucidpixels.com
Wed Dec 2 22:06:43 UTC 2009


What is your pollfreq set to?

On Wed, 2 Dec 2009, John Jore wrote:

> Hi all, I've not been able to find the answer to my timer problem in the faq or the archives. (or google)
>
> Basically, I can't get timers to fire. They fire ignoring the timer value, as if the timer was set to 0. I'm using the OpenFiler distribution, patched to the latest and greatest.  upsmon 2.2.2
>
> When I pull the power plug, I see the text "Im In Battery" instantly, instead of after 20s. Power returned after 55 seconds. Could I be missing some dependency, external application, which upsmon uses as a timer?
> (A side issue is that it's not using the correct variable when passing to upssched-cmd, but uses the notify text itself, "ONBATT", this can be seen in the last line from, messages, $1 is "UPS ups0 at localhost on line power", but this is not important for me, but may be used to explain why the timer is not working)
>
>
> ONBATT
> Dec  2 18:48:56 storage01 upsmon[3603]: ONBATT
> Dec  2 18:48:56 storage01 wall[4371]: wall: user root broadcasted 1 lines (8 chars)
> Dec  2 18:48:56 storage01 upssched-cmd: Im On Battery
>
> Broadcast message from nut (Wed Dec  2 18:49:51 2009):
>
> UPS ups0 at localhost on line power
> Dec  2 18:49:51 storage01 upsmon[3603]: UPS ups0 at localhost on line power
> Dec  2 18:49:51 storage01 wall[4377]: wall: user root broadcasted 1 lines (34 chars)
> Dec  2 18:49:51 storage01 upssched-cmd: Unrecognized command: UPS ups0 at localhost on line power
>
>
> Last two lines of upssched.conf
> AT ONBATT * START-TIMER ONBATT 20
> AT ONLINE * CANCEL-TIMER ONBATT
>
>
> Contents of upssched-cmd
> case $1 in
>        upsgone)
>                logger -t upssched-cmd "The UPS has been gone for awhile"
>                ;;
>        ONBATT)
>                logger -t upssched-cmd "Im On Battery"
>                ;;
>        *)
>                logger -t upssched-cmd "Unrecognized command: $1"
>                ;;
> esac
>
>
>
> Regards,
> John Jore
>



More information about the Nut-upsuser mailing list