From owner-freebsd-current@FreeBSD.ORG Mon Jul 6 10:01:11 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD16E106566C for ; Mon, 6 Jul 2009 10:01:11 +0000 (UTC) (envelope-from dalroi@solfertje.student.utwente.nl) Received: from solfertje.student.utwente.nl (solfertje.student.utwente.nl [130.89.167.40]) by mx1.freebsd.org (Postfix) with ESMTP id 92EDA8FC15 for ; Mon, 6 Jul 2009 10:01:11 +0000 (UTC) (envelope-from dalroi@solfertje.student.utwente.nl) Received: from localhost (localhost [127.0.0.1]) by solfertje.student.utwente.nl (Postfix) with SMTP id 113AF805F for ; Mon, 6 Jul 2009 12:01:09 +0200 (CEST) Received: from hollewijn.internal (hollewijn.internal [10.236.150.4]) by solfertje.student.utwente.nl (Postfix) with ESMTP id C6C478053; Mon, 6 Jul 2009 12:01:08 +0200 (CEST) From: Alban Hertroys To: Rene Schickbauer In-Reply-To: <18510.213.150.228.38.1246864978.squirrel@mail.magicbooks.org> X-Priority: 3 (Normal) References: <18510.213.150.228.38.1246864978.squirrel@mail.magicbooks.org> Message-Id: <2A58225C-B4F9-40E5-8AFE-D169F391B4C2@solfertje.student.utwente.nl> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Mon, 6 Jul 2009 12:01:08 +0200 X-Mailer: Apple Mail (2.935.3) X-DSPAM-Result: Innocent X-DSPAM-Processed: Mon Jul 6 12:01:09 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 909,4a51cb65759151706116102 X-DSPAM-Factors: 27, could, 0.40000, That, 0.40000, From*Alban, 0.40000, to+determine, 0.40000, to+determine, 0.40000, (provided+the, 0.40000, AM, 0.40000, Mime-Version*Message, 0.40000, AM+Rene, 0.40000, 5+Minutes, 0.40000, or, 0.40000, >+status, 0.40000, an, 0.40000, an, 0.40000, estimation, 0.40000, read+(programmatically), 0.40000, trees, 0.40000, trees, 0.40000, To*magicbooks.org>, 0.40000, easier, 0.40000, Date*12, 0.40000, rough, 0.40000, cut, 0.40000, of, 0.40000, of, 0.40000, syslog, 0.40000, Received*ESMTP, 0.40000 Cc: freebsd-current@freebsd.org Subject: Re: RFC: powerd Patch & proposed future changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Jul 2009 10:01:12 -0000 On Jul 6, 2009, at 9:22 AM, Rene Schickbauer wrote: > BTW, i'm also thinking of having the option to have powerd log the > battery > status (ac mode + load + charge level) every 5 Minutes or so to > syslog. That > way, a second script (log parser) may be able to determine > information about > the battery - like how long does it take to charge, rough capacity > estimation and possible degradation of battery. Currently some similar information is available through sysctl's (cpu load + temperature for example). To me that seems to be a bit more flexible as a means of providing such information about battery status (you don't depend on a 5 minute interval in a log-file) and probably easier to read (programmatically) than parsing a file. And it doesn't need writing to a file-system that's trying to safe power while being carried around with the system off AC. OTOH, a sysctl doesn't keep a history of past events while a log-file does; you could write something that parsed an existing log-file to determine battery life expectations immediately (provided the log-file wasn't rotated too recent) while reading sysctl's would need some time to collect enough statistics. Just an idea. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:909,4a51cb65759151706116102!