alta wrote:
(6) Test it.
upsc localhost
This will display status info about your UPS. Try pulling the power plug, and see the status change. Your computer will not be shut down until the Low Battery event occurs.
I picked up a script to use as the Notifycmd in upsmon.conf from the smartups website (I forget the URL) about a year ago. It allows, through the use of the notifycmd (which was designed to send a message/email when there was a power failure), to define when to shutdown, instead of waiting til the battery is low (which I would think would lower the life of the battery as lead acid batteries do not like to get deep cycled). Hope it may be useful. I'll paste it below. ------------------------------------------------------------------------ #!/bin/sh MINUTES=20 TIMEDSHUTDOWN=y TEXT=`echo $* | tr -d " "` case $TEXT in UPSisonbattery) if [ y$TIMEDSHUTDOWN = yy ] ; then /bin/touch /etc/killpower # echo >/etc/powerstatus "FAIL" # /bin/kill -SIGPWR 1 /sbin/shutdown -h +$MINUTES "Power Failure; System Shutting Down" & fi ;; UPSbackonlinepower) if [ y$TIMEDSHUTDOWN = yy ] ; then /bin/rm -f /etc/killpower # echo >/etc/powerstatus "OK" # /bin/kill -SIGPWR 1 /sbin/shutdown -c "Power Restored; Shutdown Cancelled" fi ;; esac -- Joe & Sesil Morris New Tribes Mission Email Address: Joe_Morris@ntm.org Web Address: www.mydestiny.net/~joe_morris Registered Linux user 231871