Anna Skorokhodova (Yandex)
2012-Jun-25 08:02 UTC
[Nut-upsuser] upssched script doesn't start on event
Dear list, Can't make upssched notify me on event occured. OS: Debian, 2.6.26-1-amd64 Nut: 2.4.3-1.1squeeze1 UPS: Ippon Smart Winner 3000 connected via COM On event ( plug out the cord from UPS ) upsmon detect's status change to OB and gives WALL and syslog notify, but no script starting. In syslog no errors and no upssched process occured, just upsmon. There're no PIPE and LOCK file in /var/run/nut/upssched/ created. All files are located by package defaults. Permissions: -rw-r--r-- 1 root root 1417 ??? 10 13:49 nut.conf -rw-r----- 1 root nut 3897 ??? 20 12:24 ups.conf -rw-r----- 1 root nut 1828 ??? 10 19:52 upsd.conf -rw-r----- 1 root nut 2142 ??? 16 21:21 upsd.users -rw-r----- 1 root nut 12007 ??? 21 16:13 upsmon.conf -rw-r----- 1 root nut 4048 ??? 25 00:39 upssched.conf -rwxr-xr-x 1 root root 27696 ??? 27 2010 /sbin/upssched Running process: nut 2682 0.0 0.0 14320 656 ? Ss 10:24 0:00 /sbin/upsd root 2684 0.0 0.0 14288 740 ? Ss 10:24 0:00 /sbin/upsmon nut 2686 0.0 0.0 14288 692 ? S 10:24 0:00 /sbin/upsmon anita at mail2:/etc/nut$ ls -la /var/run/nut/upssched/ drwxr-xr-x 2 nut nut 4096 ??? 22 13:50 . drwxrwx--- 3 root nut 4096 ??? 25 10:24 .. File listing: ------------- nut.conf:MODE=standalone ------------- ups.conf:[ippon] ups.conf: driver=blazer_ser ups.conf: port=/dev/ttyS0 ups.conf: desc="Ippon Smart Winner 3000" ups.conf: default.battery.voltage.high=110 ups.conf: default.battery.voltage.low=86.7 ups.conf: offdelay=300 ups.conf: ondelay=6 ------------- upsd.conf:LISTEN 127.0.0.1 3493 upsd.conf:LISTEN 192.168.7.105 3493 ----------- upsd.users:[root] upsd.users:password=**password** upsd.users:actions=set upsd.users:instcmds=all upsd.users:[monmaster] upsd.users:password=***password* upsd.users:upsmon master upsd.users:[monslave] upsd.users:password=**password** upsd.users:upsmon slave upsd.users:[piebnsrv] upsd.users:password=**password** upsd.users:upsmon slave ------------ upsmon.conf: MONITOR ippon at localhost 1 monmaster bggjy master MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" NOTIFYCMD /sbin/upssched POLLFREQ 5 POLLFREQALERT 5 HOSTSYNC 15 DEADTIME 15 POWERDOWNFLAG /etc/killpower NOTIFYMSG LOWBATT "UPS %s battery is critically low" NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG FSD SYSLOG+WALL+EXEC RBWARNTIME 43200 NOCOMMWARNTIME 300 FINALDELAY 20 ------------- upssched.conf: CMDSCRIPT /usr/local/bin/upssched-cmd PIPEFN /var/run/nut/upssched/upssched.pipe LOCKFN /var/run/nut/upssched/upssched.lock AT ONBATT * EXECUTE onbatt AT ONBATT * START-TIMER onbatt_timer 120 AT ONLINE * CANCEL-TIMER onbatt_timer AT ONLINE * EXECUTE online AT FSD * EXECUTE fsd --------------- -rwxr-x--- 1 nut nut 665 ??? 25 01:01 /usr/local/bin/upssched-cmd What am i doing wrong? thanks ahead. -- A.
On Mon, 25 Jun 2012, Anna Skorokhodova (Yandex) wrote:> Can't make upssched notify me on event occured.Hello Anna, Does the script /usr/local/bin/upssched-cmd get called? What happens if you place a command such as # Debugging: Log all calls to this script logger -t upssched-cmd Calling upssched-cmd $1 at the top of the script? Does syslog record anything? Roger> ------------- > upssched.conf: > CMDSCRIPT /usr/local/bin/upssched-cmd > PIPEFN /var/run/nut/upssched/upssched.pipe > LOCKFN /var/run/nut/upssched/upssched.lock > AT ONBATT * EXECUTE onbatt > AT ONBATT * START-TIMER onbatt_timer 120 > AT ONLINE * CANCEL-TIMER onbatt_timer > AT ONLINE * EXECUTE online > AT FSD * EXECUTE fsd