[Nut-upsuser] upssched. Again.

Arjen de Korte nut+users at de-korte.org
Sun Jun 24 18:44:07 UTC 2007


Ciprian Marius Vizitiu wrote:
> Hi everyone, 
>  
> Here I am with my second attempt to persuade upssched to do things; for some
> reasons it just won't! Or if it runs, it never runs the script.
> 
> OK, the story first: 2.0.3 (conveniently comes as RPMs by default on FC6)
> running on FC6; APC Smart-UPS 750 via serial connection all working fine.
> Here are the main files:

> /etc/sysconfig/ups
> 
> SERVER=yes
> MODEL=apcsmart
> DEVICE=/dev/ttyS0
> OPTIONS=

Please change to

	MODEL=upsdrvctl
	DEVICE=

> /etc/ups/ups.conf
> 
> [APC750]
>         driver = apcsmart
>         port = /dev/ttyS0
> #       cable = 1234
>         desc = "Smart-UPS 750"

Looks fine.

> /etc/ups/upsd.conf
> 
> ACL all 0.0.0.0/0
> ACL localhost 127.0.0.1/32
> 
> ACCEPT localhost
> REJECT all

OK

> /etc/ups/upssched.conf
> 
> CMDSCRIPT /usr/sbin/upssched-cmd
> PIPEFN /var/run/upssched/upssched.pipe
> LOCKFN /var/run/upssched/upssched.lock
> 
> #AT ONBATT APC750 at localhost START-TIMER onbattwarn 60
> 
> AT ONBATT APC750 at localhost EXCUTE onbattwarn

Typo? The command here should read EXECUTE.

> #AT ONLINE APC750 at localhost CANCEL-TIMER onbattwarn

[...]

> To my mind this "should work!"(TM), upssched should run the script when I
> unplug the UPS. Yet it doesn't... I get the wall and the log messages for
> the event but I never get to see the message "The UPS has been gone for
> awhile" in the logs or the file created in /tmp. Oh and if I uncomment the
> START-TIMER lines nothing shows up in "/var/run/upssched/"... Shouldn't it
> be at least the LOCKFN during the timer period?
> 
> Any hints? :-(

What are the contents of 'upsmon.conf', most notably the EXEC flag on
the relevant NOTIFYFLAG items? Is upsmon running?

Best regards, Arjen



More information about the Nut-upsuser mailing list