[Nut-upsuser] MGE Nova 1100 AVR + upssched

Pedro Bonfiglio pedro.bonfiglio at refert.com
Tue Nov 21 17:27:01 CET 2006


Hi, I'm having problems to configure upssched in order to notify me only
when the disconnection exceeds the 30 seconds.
Now, I'm getting a mail if it is disconnected just for a second, or even
worse, when I got low tension.
So, mail notifications are well configured, I guess...
I think the problem is in upssched.
I'm new to this, so it could be a stupid thing that I'm missing...

My configurations files are like this:

*ups.conf:*

[ups0]
                driver = mge-shut
                port = /dev/ttyS0         #It's serial, not USB


*upsmon.conf:*

# NOTIFYCMD <command>
NOTIFYCMD /usr/local/ups/bin/notifyme

# POWERDOWNFLAG - Flag file for forcing UPS shutdown on the master system
POWERDOWNFLAG /etc/killpower    
# This file is supposed to be created by NUT when a disconnection
occurs, but I didn't see it. Am I right?


*upssched.conf:*

# CMDSCRIPT <scriptname>
CMDSCRIPT /usr/local/ups/bin/upssched-cmd

# PIPEFN <filename>
PIPEFN /var/run/upssched/upssched.pipe

# LOCKFN <filename>
LOCKFN /var/run/upssched/upssched.lock
#The directory /var/run/upssched is world-writable so both files could
be created, but it is actually empty.

# Possible AT commands
AT ONBATT * START-TIMER upsgone 30


Then, I got two more files in */usr/local/ups/bin*: notifyme and
upssched-cmd

*notifyme:*

#!/bin/sh
echo "$@" | mail -s "[NUT] Notify" mail at address


*upssched-cmd:*

case $1 in
        upsgone)
                echo "The UPS has been on battery for awhile" \
                | mail -s "[NUT] Notify" mail at address
        ups-back-on-line)
                /bin/rm -f /var/run/upssched/ups-on-battery
        *)
                logger -t upssched-cmd "Unrecognized command: $1"
                ;;
esac


All advices will be welcome


Thanks in advance,

-- 
Pedro Bonfiglio
IT Project Leader

Refert
http://www.refert.com




More information about the Nut-upsuser mailing list