





Code: Select all
Tue Oct 26 14:15:19 CDT 2004 Power failure.
Tue Oct 26 14:15:25 CDT 2004 Running on UPS batteries.
Tue Oct 26 14:23:49 CDT 2004 Reached remaining time percentage limit on batteries.
Tue Oct 26 14:23:49 CDT 2004 Initiating system shutdown!
Tue Oct 26 14:23:49 CDT 2004 User logins prohibited
Tue Oct 26 14:23:49 CDT 2004 BCHARGE : 091.0 Percent
Tue Oct 26 14:23:49 CDT 2004 TIMELEFT : 0.0 Minutes
Tue Oct 26 14:23:51 CDT 2004 apcupsd exiting, signal 15
Tue Oct 26 14:23:51 CDT 2004 apcupsd shutdown succeeded
Code: Select all
Tue Oct 26 22:12:16 CDT 2004 Power failure.
Tue Oct 26 22:12:22 CDT 2004 Running on UPS batteries.
Tue Oct 26 22:40:09 CDT 2004 Reached remaining time percentage limit on batteries.
Tue Oct 26 22:40:09 CDT 2004 Initiating system shutdown!
Tue Oct 26 22:40:09 CDT 2004 User logins prohibited
Tue Oct 26 22:40:09 CDT 2004 BCHARGE : 071.0 Percent
Tue Oct 26 22:40:09 CDT 2004 TIMELEFT : 0.0 Minutes
Tue Oct 26 22:40:11 CDT 2004 apcupsd exiting, signal 15
Tue Oct 26 22:40:11 CDT 2004 apcupsd shutdown succeeded

So, I need to calibrate it... I wonder if not letting it charge for the full eight hours before I started using it had anything to do with it not calibrating properly... I think I'll let it charge for eight before I plug everything back in.Adam Kropelin wrote:I found my RS 1500 units needed a runtime calibration before the remaining time estimate was even close. Disable apcupsd, put a load of 50% or more on the UPS, and pull the plug. Let the batteries run completely dry, then plug it back in and let it recharge. After that the remaining time estimate should be much more accurate.
I suspect the reason you are seeing TIMELEFT at 0.0 is that it does not scale down nice and linearly, especially when the calibration is way of. It may drop from > 3.0 down to 0.0 in the course of a few seconds. I use a little script like this to watch the behavior of TIMELEFT and BCHARGE over time:
while [ 1 ] ; do
/sbin/apcaccess status | egrep TIMELEFT\|BCHARGE ;
sleep 1 ;
done
You can throw all that on one command line; I just wrapped it for the sake of fitting it in the email margins. It will give you an update of those variables each second, which is a good way to spot trends.

Code: Select all
Sat Oct 30 12:15:49 CDT 2004 Power failure.
Sat Oct 30 12:15:55 CDT 2004 Running on UPS batteries.
Sat Oct 30 13:30:31 CDT 2004 Battery power exhausted.
Sat Oct 30 13:30:31 CDT 2004 Initiating system shutdown!
Sat Oct 30 13:30:31 CDT 2004 User logins prohibited
Sat Oct 30 13:30:31 CDT 2004 Running on UPS batteries.
Sat Oct 30 13:30:31 CDT 2004 BCHARGE : 009.0 Percent
Sat Oct 30 13:30:31 CDT 2004 TIMELEFT : 4.3 Minutes
Sat Oct 30 13:30:34 CDT 2004 apcupsd exiting, signal 15
Sat Oct 30 13:30:34 CDT 2004 apcupsd shutdown succeeded



Code: Select all
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /cvsroot/apcupsd/apcupsd/platforms/gentoo/apcupsd.in,v 1.1 2002/09/14 12:03:18 rfacchetti Exp $
APCPID=/var/run/apcupsd.pid
APCUPSD=/usr/sbin/apcupsd
depend() {
after hotplug
after usb
after net
}
start() {
rm -f /etc/apcupsd/powerfail
ebegin "Starting APC UPS daemon"
start-stop-daemon --start --quiet --exec $APCUPSD -- 1>&2
eend $?
}
stop() {
ebegin "Stopping APC UPS daemon"
start-stop-daemon --stop --quiet --pidfile $APCPID
eend $?
}Code: Select all
after coldplugCode: Select all
# Attempting to add apcupsd's killpower function here
if [ -f /etc/apcupsd/powerfail ]; then
ewarn "Power failure - shutting of UPS"
/etc/apcupsd/apccontrol killpower
sleep 120,
exit 1
fi

