From owner-freebsd-questions@FreeBSD.ORG Tue Apr 6 20:02:17 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03E9716A4CE for ; Tue, 6 Apr 2004 20:02:17 -0700 (PDT) Received: from smtp3b.sentex.ca (smtp3b.sentex.ca [205.211.164.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id B530943D5F for ; Tue, 6 Apr 2004 20:02:16 -0700 (PDT) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by smtp3b.sentex.ca (8.12.11/8.12.11) with ESMTP id i372xWU3023223; Tue, 6 Apr 2004 22:59:32 -0400 (EDT) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.10/8.12.10) with ESMTP id i3730o3x045869; Tue, 6 Apr 2004 23:00:50 -0400 (EDT) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id i3730j9v087388; Tue, 6 Apr 2004 23:00:45 -0400 (EDT) (envelope-from mike@sentex.net) Message-Id: <6.0.3.0.0.20040406225227.10c36bf8@209.112.4.2> X-Sender: mdtpop@209.112.4.2 (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.0.3.0 Date: Tue, 06 Apr 2004 23:02:22 -0400 To: Me , Gregory Edigarov From: Mike Tancsa In-Reply-To: <20040407024856.87637.qmail@web42001.mail.yahoo.com> References: <9tg670l8f5n8u0g4nitg4cf25d7cigacu7@4ax.com> <20040407024856.87637.qmail@web42001.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new cc: questions@freebsd.org Subject: Re: APC UPS with USB ? Anybody? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Apr 2004 03:02:17 -0000 At 10:48 PM 06/04/2004, Me wrote: >That would be sufficient to create a script to monitor >the power state, maybe have the script check the >status again in 10 minutes and shutdown the PC if >necessary. >It can be done right? The time estimate is very inaccurate on the ES and RS units that I have used. You would have better luck shutting down based on battery strength. You can glean this info from the proc title, or process it as it gets sent to local1 via syslog. But yes, it can be done eg here is a sample power failure as it gets recorded in local1 Feb 16 13:04:33 noborders apc-upsd: Battery strength Level 49% ETTL 1 min Feb 16 13:04:34 noborders apc-upsd: Battery strength Level 48% ETTL 1 min Feb 16 13:04:34 noborders apc-upsd: Battery strength Level 47% ETTL 1 min Feb 16 13:04:35 noborders apc-upsd: Battery strength Level 46% ETTL 1 min Feb 16 13:04:57 noborders last message repeated 6 times Feb 16 13:04:57 noborders apc-upsd: Battery strength Level 45% ETTL 1 min Feb 16 13:05:19 noborders last message repeated 7 times Feb 16 13:05:20 noborders apc-upsd: Battery strength Level 44% ETTL 1 min Feb 16 13:05:24 noborders apc-upsd: Battery strength Level 43% ETTL 1 min Feb 16 13:05:24 noborders apc-upsd: Battery strength Level 43% ETTL 1 min Feb 16 13:05:24 noborders apc-upsd: Battery strength Level 42% ETTL 1 min Feb 16 13:05:25 noborders apc-upsd: Battery strength Level 41% ETTL 1 min Feb 16 13:05:49 noborders last message repeated 6 times Feb 16 13:05:53 noborders apc-upsd: Battery strength Level 40% ETTL 1 min Feb 16 13:06:05 noborders last message repeated 8 times Feb 16 13:06:05 noborders apc-upsd: Battery strength Level 39% ETTL 1 min Feb 16 13:06:06 noborders apc-upsd: Battery strength Level 38% ETTL 1 min Feb 16 13:06:06 noborders apc-upsd: Battery strength Level 37% ETTL 1 min Feb 16 13:06:11 noborders apc-upsd: Battery strength Level 37% ETTL 1 min Feb 16 13:06:14 noborders apc-upsd: Battery strength Level 36% ETTL 1 min Feb 16 13:06:41 noborders last message repeated 10 times Feb 16 13:06:45 noborders last message repeated 2 times Feb 16 13:06:45 noborders apc-upsd: Battery strength Level 35% ETTL 1 min Feb 16 13:06:46 noborders apc-upsd: Battery strength Level 34% ETTL 1 min Feb 16 13:06:46 noborders apc-upsd: Battery strength Level 33% ETTL 1 min Feb 16 13:06:47 noborders apc-upsd: Battery strength Level 32% ETTL 1 min Feb 16 13:07:08 noborders last message repeated 6 times Feb 16 13:07:08 noborders apc-upsd: Battery strength Level 31% ETTL 1 min Feb 16 13:07:19 noborders last message repeated 3 times Feb 16 13:07:20 noborders apc-upsd: Battery strength Level 30% ETTL 1 min Feb 16 13:07:20 noborders apc-upsd: Battery strength Level 30% ETTL 1 min Feb 16 13:07:20 noborders apc-upsd: Battery strength Level 29% ETTL 1 min Feb 16 13:07:21 noborders apc-upsd: Battery strength Level 28% ETTL 1 min Feb 16 13:07:22 noborders last message repeated 2 times