[Nut-upsuser] Timer Daemon doesn't start

Stefan Kuhn kuhn at papier.tu-darmstadt.de
Mon May 21 06:19:08 UTC 2012


Hey,

the timers still don't start. Can someone give me a tip why?

Greetings Stefan

-----Ursprüngliche Nachricht-----
Von: Stefan Kuhn 
Gesendet: Donnerstag, 17. Mai 2012 17:10
An: nut-upsuser Mailing List
Betreff: AW: [Nut-upsuser] Timer Daemon doesn't start

Hey,

I made a mistake, it still doesn't work.

Now I have the following log information:
May 17 16:43:05 s-monitor1 upsmon[1674]: UPS usv1 at localhost on battery May 17 16:43:05 s-monitor1 upssched[25113]: Executing command: ONBATT

The timers still don't start but I don't know why. There aren't more information in the log file. 

I hope you can help me.

Greetings Stefan

-----Ursprüngliche Nachricht-----
Hey,

I changed the owner group and the access permissions and now it works, thank you.

Greetings Stefan

-----Ursprüngliche Nachricht-----
Von: nut-upsuser-bounces+kuhn=papier.tu-darmstadt.de at lists.alioth.debian.org [mailto:nut-upsuser-bounces+kuhn=papier.tu-darmstadt.de at lists.alioth.debian.org] Im Auftrag von Roger Price
Gesendet: Dienstag, 15. Mai 2012 12:15
An: nut-upsuser Mailing List
Betreff: Re: [Nut-upsuser] Timer Daemon doesn't start

On Tue, 15 May 2012, Stefan Kuhn wrote:

> -rw-r--r--   1 root root  4555 2012-05-13 22:31 upssched-cmd

Hi Stefan, Shouldn't upssched-cmd be executable ?  I would expect to see -rwxr--r--.

Roger

_______________________________________________
Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

-----Ursprüngliche Nachricht-----
Hey,

That's the output:
-rw-r--r--   1 root root  4555 2012-05-13 22:31 upssched-cmd

The upsmon runs twice, once as root and once as nut. Output:
root      1672  0.0  0.0   2016   676 ?        Ss   Mar13   0:00 /sbin/upsmon
nut       1674  0.0  0.0   2016   764 ?        S    Mar13   3:27 /sbin/upsmon

If you need some more information please tell me.

Greetings Stefan

-----Ursprüngliche Nachricht-----
Von: nut-upsuser-bounces+kuhn=papier.tu-darmstadt.de at lists.alioth.debian.org [mailto:nut-upsuser-bounces+kuhn=papier.tu-darmstadt.de at lists.alioth.debian.org] Im Auftrag von Roger Price
Gesendet: Dienstag, 15. Mai 2012 10:35
An: nut-upsuser Mailing List
Betreff: Re: [Nut-upsuser] Timer Daemon doesn't start

On Tue, 15 May 2012, Stefan Kuhn wrote:

> May 13 21:50:34 s-monitor1 upssched[855]: exec_cmd(/etc/nut/upssched-cmd ONBATT) returned 126

Hi, What are the permissions on /etc/nut/upssched-cmd ?

Roger

_______________________________________________
Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

-----Ursprüngliche Nachricht-----
Von: Stefan Kuhn 
Gesendet: Dienstag, 15. Mai 2012 10:24
An: nut-upsuser at lists.alioth.debian.org
Betreff: Timer Daemon doesn't start

Hey,

I have the problem that my timer daemon doesn't start. I checked my configuration more than two times and I don't find the failure. Maybe someone can help me and tell me where the failure could be.

--- syslog ---
May 13 21:50:34 s-monitor1 upsmon[1674]: UPS usv3 at localhost on battery
May 13 21:50:34 s-monitor1 upssched[855]: Executing command: ONBATT
May 13 21:50:34 s-monitor1 upssched[855]: exec_cmd(/etc/nut/upssched-cmd ONBATT) returned 126
May 13 21:51:04 s-monitor1 upsmon[1674]: UPS usv1 at localhost on battery
May 13 21:51:04 s-monitor1 upsmon[1674]: UPS usv2 at localhost on battery
May 13 21:51:04 s-monitor1 upssched[1173]: Executing command: ONBATT
May 13 21:51:04 s-monitor1 upssched[1174]: Executing command: ONBATT
May 13 21:51:04 s-monitor1 upssched[1173]: exec_cmd(/etc/nut/upssched-cmd ONBATT) returned 126
May 13 21:51:04 s-monitor1 upssched[1174]: exec_cmd(/etc/nut/upssched-cmd ONBATT) returned 126

As you can see, there is no information about the starting of any timer in the syslog.


--- upssched.conf ---
AT ONBATT usv1 START-TIMER VERZ2 120
AT ONLINE usv1 CANCEL-TIMER VERZ2

AT ONBATT usv1 START-TIMER VERZ5 300
AT ONLINE usv1 CANCEL-TIMER VERZ5

AT ONBATT usv1 START-TIMER VERZ8 480
AT ONLINE usv1 CANCEL-TIMER VERZ8

AT ONBATT * EXECUTE ONBATT
AT ONLINE * EXECUTE ONLINE
AT COMMOK * EXECUTE COMMOK
AT COMMBAD * EXECUTE COMMBAD
AT FSD * EXECUTE FSD
AT LOWBATT * EXECUTE LOWBATT
AT NOCOMM * EXECUTE NOCOMM
AT REPLBATT * EXECUTE REPLBATT
AT SHUTDOWN * EXECUTE SHUTDOWN

Here are the 3 timers which should be started (VERZ2, VERZ5, VERZ8).


--- upssched-cmd ---
[.]
case $1 in
COMMBAD)    notify $PAGER $1 "UPS communications lost" ;;
COMMOK)     notify $PAGER $1 "UPS communications established" ;;
FSD)        notify $EMAIL $1 "UPS being shut down by master" ;;
NOCOMM)     notify $PAGER $1 "UPS unavailable" ;;
ONBATT)     notify $PAGER $1 "UPS on battery power";;
ONLINE)     notify $PAGER $1 "UPS on line power" ;;
REPLBATT)   notify $EMAIL $1 "UPS battery needs replacement" ;;
SHUTDOWN)   notify $EMAIL $1 "NUT shutting system down" ;;
VERZ2)      notify $EMAIL $1 "USV 2 Minuten auf Batterie -> Shutdown ";
            echo "USV 2 Minuten auf Batterie -> Shutdown"
[.]
;;
VERZ5)      notify $EMAIL $1 "USV 5 Minuten auf Batterie -> Shutdown ";
[.]
;;
VERZ8)      notify $EMAIL $1 "USV 8 Minuten auf Batterie -> Shutdown ";
[.]
;;
LOWBATT)   notify $EMAIL $1 "USV wird leer -> Shutdown des Monitor Servers";
[.]
;;
Esac


I hope I'm giving you all necessary information and you can help me.

Greetings and Thanks,
Stefan



More information about the Nut-upsuser mailing list