[Nut-upsuser] APC Smart-UPS X 1500 Restart Issue.
AJain at dataram.com
Tue Aug 24 01:07:08 UTC 2010
I have applied a workaround for this issue. I have updated the
/etc/init.d/halt to call the following script instead of
[root at DVXSAJ02 ~]# cat /opt/bin/check_ups_status.sh
# This script is called from /etc/init.d/halt.
# If the file /etc/killpower is present, check for UPS status.
# If AC is present, reboot system.
# If UPS is on battery, sleep and recheck after 30 seconds.
# If UPS runs out of battery, system will stop and get powered-on when
AC is back. Check BIOS for this setting.
# Notes: File system is mounted read-only when this script is called.
# $ups_out will contain the following if AC is Present:
# 0.087258 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Input, ReportID: 0x07, Offset: 2, Size: 1, Value: 1.000000
# $ups_out will contain the following if AC is Not Present:
# 0.087237 Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Input, ReportID: 0x07, Offset: 2, Size: 1, Value: 0.000000
[ ! -f /etc/killpower ] && exit 0
while [ 1 ]
( sleep 5; /usr/bin/killall usbhid-ups 2> /dev/null ) &
ups_out=`/sbin/usbhid-ups -D -a scups 2>&1 | grep
UPS.PowerSummary.PresentStatus.ACPresent | grep Input`
ac_present=`echo $ups_out | sed 's/.*\<Value\>: \(*\).*/\1/'`
if [ $ac_present = "1" ]; then
echo "UPS - AC is present"
echo "Rebooting system..."
if [ $first_time = "1" ]; then
echo -n "UPS - On Battery, sleeping..."
echo -n "."
[root at DVXSAJ02 ~]#
This sleeps until AC power returns. When battery runs out, system stop
and reboots when power is back.
From: nut-upsuser-bounces+ajain=dataram.com at lists.alioth.debian.org
[mailto:nut-upsuser-bounces+ajain=dataram.com at lists.alioth.debian.org]
On Behalf Of Jain, Arvind
Sent: Friday, August 20, 2010 11:57 AM
To: nut-upsuser at lists.alioth.debian.org
Subject: [Nut-upsuser] APC Smart-UPS X 1500 Restart Issue.
APC Smart-UPS X 1500 Restart Issue.
I have installed nut-2.4.3. I have manually modified the files apc-hid.c
and udev-rules to support 5G APC UPS. I took sample code from the 2.5
Shutdown process is working very well -- upsmon creates the file
/etc/killpower - shutdown script checks for the file and issues
/sbin/upsdrvctl shutdown - UPS cuts the power off. All is well.
I am facing an issue when power is reapplied to the UPS. Following is
the behavior I see:
1. Power comes back to the outlet.
2. System powers up.
3. When system reaches "Starting udev", UPS power cycles again.
Above cycle repeats forever.
If I cut the power to UPS for ~20 mins and then re-apply power to UPS,
system comes back fine.
I was searching through the mail-list and I see some other people are
experiencing similar issue:
I was wondering if there is a resolution for this issue.
[root at DVXSAJ02 etc]# uname -a
Linux DVXSAJ02 184.108.40.206-133.xssmp #1 SMP Sat Aug 14 10:13:27 EDT 2010
x86_64 x86_64 x86_64 GNU/Linux
[root at DVXSAJ02 etc]# cat /etc/redhat-release
CentOS release 5.4 (Final)
[root at DVXSAJ02 etc]# upsc scups
device.mfr: American Power Conversion
device.model: Smart-UPS X 1500
driver.version.data: APC HID 0.95
ups.firmware: COM 02.3 / UPS 02.2
ups.mfr: American Power Conversion
ups.model: Smart-UPS X 1500
ups.status: OL CHRG
[root at DVXSAJ02 etc]#
[root at DVXSAJ02 etc]# cat /etc/sysconfig/ups
# If the UPS is locally attached set it to "yes"
# Any options to pass to upsd
# Added MODEL=upsdrvctl so that /etc/init.d/halt will issue
# This *must* be the same as in /etc/ups/upsmon.conf
[root at DVXSAJ02 etc]# cat /etc/ups/ups.conf
driver = usbhid-ups
port = auto
desc = "UPS on USB"
Any suggestion is welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nut-upsuser