From owner-freebsd-questions Thu Aug 3 23:10: 7 2000 Delivered-To: freebsd-questions@freebsd.org Received: from isy.liu.se (isy.liu.se [130.236.48.10]) by hub.freebsd.org (Postfix) with ESMTP id 0EA9237B7FC for ; Thu, 3 Aug 2000 23:10:00 -0700 (PDT) (envelope-from mj@isy.liu.se) Received: from lagrange.isy.liu.se (lagrange.isy.liu.se [130.236.49.127]) by isy.liu.se (8.10.0/8.10.0) with ESMTP id e7469un28397; Fri, 4 Aug 2000 08:09:57 +0200 (MET DST) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <85256930.005E9BE7.00@Deimos.smed.com> Date: Fri, 04 Aug 2000 08:09:56 +0200 (CEST) From: Micke Josefsson To: Joe.Warner@smed.com Subject: RE: UPSD Locks up my system, please help! Cc: freebsd-questions@FreeBSD.ORG Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 03-Aug-00 Joe.Warner@smed.com wrote: > > > Hi, I recently hooked up a UPS (APC Smart-UPS) to my FreeBSD (3.4) > machine and installed upsd-2.0 from the ports collection on the CD ROM > set. [etc etc] My APC Smart UPS runs fine with upsmon-2.1.3/ from the ports. upsmon.sh in /usr/local/etc/rc.d/ looks like this: #!/bin/sh # see /usr/local/share/doc/upsmon/INSTALL for command line option details if [ -x /usr/local/sbin/upsmond ]; then /usr/local/sbin/upsmond -p /dev/cuaa1 -r 20 && echo -n ' upsmond' fi I have used cuaa1 (COM2 in dos-parlance) so as to have a mouse on cuaa0 (-p). I also have a small load so I let the system power me for 20 minutes before shutting down completely (-r). #ll /dev/cuaa* crw-rw---- 1 uucp dialer 28, 128 27 Jun 14:00 /dev/cuaa0 crw-rw---- 1 uucp dialer 28, 129 27 Jun 13:10 /dev/cuaa1 and /etc/ttys: ttyd0 "/usr/libexec/getty std.9600" dialup off secure ttyd1 "/usr/libexec/getty std.9600" dialup off secure The program upsstat (in the same port) gives this: UPSMON Status Reporting Facility --- upsmond version 2.1.3 --- APC UPS 700 Status Info -------------------------------------------------------- Model: SMART-UPS 700 CopyRight: (C) APCC Manufacture date: 12/18/99 Serial #: NS9951331687 Firmware version: 50.11.I Local ID: UPS_IDEN Last battery replace date: 12/18/99 Nominal line voltage: 230 V Nominal battery voltage: 24 V Available: YES Standby: NO Line Power: OK Battery: OK Line Voltage: 230.10 Load: 20.20 % Battery Voltage: 27.33 Battery Level: 100.00 % -------------------------------------------------------- Installation was easy the problem was to get syslogd to log it. Finally this cured it: Insert into /etc/syslog.conf: !UPS *.* /var/log/upsmon.log The trick was to find the magic word UPS. I hade to read the sources to find that one:( And now the log says something when power is going down: Jul 30 08:18:25 vanheden UPS: Input line power failure Jul 30 08:18:57 vanheden UPS: Input line power failure Jul 30 08:19:38 vanheden UPS: Input line power failure Jul 30 08:19:38 vanheden UPS: Power Failure - 1127 seconds to shutdown! Jul 30 08:20:19 vanheden UPS: Input line power failure [snip snip] Jul 30 08:38:04 vanheden UPS: Power Failure - 21 seconds to shutdown! Jul 30 08:38:45 vanheden UPS: Input line power failure Jul 30 08:38:45 vanheden UPS: Power Failure - System shutdown now! [ A clean shutdown at this point ] Jul 30 10:28:09 vanheden UPS: upsmond daemon started - version 2.1.3 Jul 30 10:28:09 vanheden UPS: Input line power back Aug 1 13:10:32 vanheden UPS: upsmond daemon started - version 2.1.3 Aug 3 03:26:29 vanheden UPS: Input line power failure Aug 3 03:26:30 vanheden UPS: Input line power back Hope this helps a bit. /Micke ---------------------------------- Michael Josefsson, MSEE mj@isy.liu.se This message was sent by XFMail running on FreeBSD 3.5-STABLE ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message