Re: apcupsd
On Tuesday 05 September 2006 13:22, Erik Mouw wrote:
> On Mon, Sep 04, 2006 at 07:02:51AM +0200, Francesco Pietra wrote:
> > While in a few minutes I got working a Chinese serial-connection UPS
The Chinese was a KRAUPP 500, incredibly provided of (a non advertised) Linux
driver. Where the drastic "poweroff" could be replaced by "shutdown -h now",
which was perfectly understood, passed, and obtained at poweroff/battery down
> > , I
> > am experiencing diffulties with APC via USB as STANDALONE (kernel
> > 2.6.15-1).
>
> So what is it? An APC UPS, or some kind of Chinese brand?
I have two from APC,Back-Ups CS 500 and Back-Ups RS 1500. Trial below refersto
the 500.
My aim isimply to have done done at
poweroff/battery low:
#Ctrl C (to kill mpqc231 computation; there is no X system)
# shutdown -h now (to close Debian)
Behavior of 500 is indicated anew below because I mistaken the outputs (sorry,
Joe, was not mistaken by apcupsd, it was by myself)
Configuration:
/etc/apcups/apcupsd.conf
## apcupsd.conf v1.1 ##
# for apcupsd release 3.12.3 (26 April 2006) - debian
UPSCABLE usb
UPSTYPE usb
DEVICE
LOCKFILE /var/lock
ONBATTERYDELAY 6
BATTERYLEVEL 5
MINUTES 3
EL,
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 127.0.0.1
NISPORT 3551
EVENTFUL /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0
# /sbin/apcupsd start
#ps fax
8540 ? Ssl 0:00 /sbin/apcupsd start
(as the list row)
#ps -eaf
root 8540 1 0 14:22 ? 00:00:00 /sbin/apcupsd start
root 8634 8534 0 14:29 pts/2 00:00:00 ps -eaf
$cat /proc/bus/usb/devices (indicates that it is seen and the correct driver
for kernel 2.6.15-1 loaded)
: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=051d ProdID=0002 Rev= 0.06
S: Manufacturer=American Power Conversion
S: Product=Back-UPS CS 500 FW:808.q7.I USB FW:q7
S: SerialNumber=BB0613061656
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 6 Ivl=100ms
# apctest
2006-09-05 14:34:05 apctest 3.12.3 (26 April 2006) debian
Checking configuration ...
Attached to driver: usb
sharenet.type = DISABLE
cable.type = USB_CABLE
You are using a USB cable type, so I'm entering USB test mode
mode.type = USB_UPS
Setting up the port ...
apctest FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
apctest FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
apctest error termination completed
# tail /var/log/messages
Sep 5 14:05:36 localhost kernel: PCI: setting IRQ 5 as level-triggered
Sep 5 14:05:36 localhost kernel: ACPI: PCI Interrupt 0000:01:00.0[A] -> Link
[LNKA] -> GSI 5 (level, low) -> IRQ 5
Sep 5 14:05:36 localhost kernel: NVRM: loading NVIDIA Linux x86 NVIDIA Kernel
Module 1.0-7174 Tue Mar 22 06:44:39 PST 2005
Sep 5 14:05:36 localhost kernel: agpgart: Found an AGP 2.0 compliant device
at 0000:00:00.0.
Sep 5 14:05:36 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:00.0 into 4x mode
Sep 5 14:05:36 localhost kernel: agpgart: Putting AGP V2 device at
0000:01:00.0 into 4x mode
Sep 5 14:05:37 localhost kernel: agpgart: Found an AGP 2.0 compliant device
at 0000:00:00.0.
Sep 5 14:05:37 localhost kernel: agpgart: Putting AGP V2 device at
0000:00:00.0 into 4x mode
Sep 5 14:05:37 localhost kernel: agpgart: Putting AGP V2 device at
0000:01:00.0 into 4x mode
Sep 5 14:20:17 localhost -- MARK --
(i.e., the expected "matou apcupsd" was not shown.
# cat /var/log/apcupsd.events
Sun Sep 03 13:59:57 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded
Sun Sep 03 14:11:11 CEST 2006 apcupsd exiting, signal 15
Sun Sep 03 14:11:11 CEST 2006 apcupsd shutdown succeeded
Sun Sep 03 14:16:20 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded
Sun Sep 03 14:18:22 CEST 2006 Valid lock file for pid=8263, but not ours
pid=8295
Sun Sep 03 14:18:22 CEST 2006 apcupsd FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
Sun Sep 03 14:18:22 CEST 2006 Valid lock file for pid=8263, but not ours
pid=8295
Sun Sep 03 14:18:22 CEST 2006 apcupsd error shutdown completed
Sun Sep 03 14:19:54 CEST 2006 Valid lock file for pid=8263, but not ours
pid=8317
Sun Sep 03 14:19:54 CEST 2006 apcupsd FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
Sun Sep 03 14:19:54 CEST 2006 Valid lock file for pid=8263, but not ours
pid=8317
Sun Sep 03 14:19:54 CEST 2006 apcupsd error shutdown completed
Sun Sep 03 14:35:02 CEST 2006 apcupsd exiting, signal 15
Sun Sep 03 14:35:03 CEST 2006 apcupsd shutdown succeeded
Mon Sep 04 05:16:27 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded
Mon Sep 04 05:39:59 CEST 2006 Valid lock file for pid=8944, but not ours
pid=9269
Mon Sep 04 05:39:59 CEST 2006 apcupsd FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
Mon Sep 04 05:39:59 CEST 2006 Valid lock file for pid=8944, but not ours
pid=9269
Mon Sep 04 05:39:59 CEST 2006 apcupsd error shutdown completed
Mon Sep 04 05:47:48 CEST 2006 apcupsd exiting, signal 15
Mon Sep 04 05:52:11 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded
Mon Sep 04 09:07:01 CEST 2006 apcupsd exiting, signal 15
Mon Sep 04 09:07:01 CEST 2006 apcupsd shutdown succeeded
Tue Sep 05 05:36:44 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded
Tue Sep 05 06:04:14 CEST 2006 Power failure.
Tue Sep 05 06:04:16 CEST 2006 Power is back. UPS running on mains.
Tue Sep 05 06:31:17 CEST 2006 Valid lock file for pid=9279, but not ours
pid=10317
Tue Sep 05 06:31:17 CEST 2006 apcupsd FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
Tue Sep 05 06:31:17 CEST 2006 Valid lock file for pid=9279, but not ours
pid=10317
Tue Sep 05 06:31:17 CEST 2006 apcupsd error shutdown completed
Tue Sep 05 06:34:10 CEST 2006 apcupsd exiting, signal 15
Tue Sep 05 06:38:33 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded
Tue Sep 05 06:50:25 CEST 2006 Valid lock file for pid=7820, but not ours
pid=7976
Tue Sep 05 06:50:25 CEST 2006 apcupsd FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
Tue Sep 05 06:50:25 CEST 2006 Valid lock file for pid=7820, but not ours
pid=7976
Tue Sep 05 06:50:25 CEST 2006 apcupsd error shutdown completed
Tue Sep 05 06:52:52 CEST 2006 Valid lock file for pid=7820, but not ours
pid=8008
Tue Sep 05 06:52:52 CEST 2006 apcupsd FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
Tue Sep 05 06:52:52 CEST 2006 Valid lock file for pid=7820, but not ours
pid=8008
Tue Sep 05 06:52:52 CEST 2006 apcupsd error shutdown completed
Tue Sep 05 06:53:27 CEST 2006 Valid lock file for pid=7820, but not ours
pid=8018
Tue Sep 05 06:53:27 CEST 2006 apcupsd FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
Tue Sep 05 06:53:27 CEST 2006 Valid lock file for pid=7820, but not ours
pid=8018
Tue Sep 05 06:53:27 CEST 2006 apcupsd error shutdown completed
Tue Sep 05 06:53:34 CEST 2006 Valid lock file for pid=7820, but not ours
pid=8021
Tue Sep 05 06:53:34 CEST 2006 apcupsd FATAL ERROR in device.c at line 68
Unable to create UPS lock file.
Tue Sep 05 06:53:34 CEST 2006 Valid lock file for pid=7820, but not ours
pid=8021
Tue Sep 05 06:53:34 CEST 2006 apcupsd error shutdown completed
Tue Sep 05 06:54:29 CEST 2006 apcupsd exiting, signal 15
Tue Sep 05 06:54:29 CEST 2006 apcupsd shutdown succeeded
Tue Sep 05 07:08:53 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded
Tue Sep 05 07:13:40 CEST 2006 apcupsd exiting, signal 15
Tue Sep 05 09:24:09 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded
Tue Sep 05 11:34:43 CEST 2006 apcupsd exiting, signal 15
Tue Sep 05 11:34:43 CEST 2006 apcupsd shutdown succeeded
Tue Sep 05 14:22:10 CEST 2006 apcupsd 3.12.3 (26 April 2006) debian startup
succeeded.
(time at the last line corresponds to the time I gave the "start").
I do not understand if it is partially working correctly and what is expected
to occur at poweroff/battery down (I would like to have "shutdown -h now"
commanded)
> If you have a non-APC UPS, use nut instead.
They are APC
Thanks a lot. I hope clarifications may be of help to other guys as well.
francesco
>
>
> Erik
Reply to:
- Follow-Ups:
- Re: apcupsd
- From: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
- References:
- apcupsd
- From: Francesco Pietra <frapietra@alice.it>
- Re: apcupsd
- From: Erik Mouw <erik@harddisk-recovery.com>