From owner-freebsd-acpi@FreeBSD.ORG Fri Dec 14 11:56:01 2007 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F11116A418 for ; Fri, 14 Dec 2007 11:56:01 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from gaia.nimnet.asn.au (nimbin.lnk.telstra.net [139.130.45.143]) by mx1.freebsd.org (Postfix) with ESMTP id 69F8413C459 for ; Fri, 14 Dec 2007 11:55:58 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (smithi@localhost) by gaia.nimnet.asn.au (8.8.8/8.8.8R1.5) with ESMTP id WAA23718; Fri, 14 Dec 2007 22:28:34 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Fri, 14 Dec 2007 22:28:33 +1100 (EST) From: Ian Smith To: =?ISO-8859-9?Q?cihan_k=F6me=E7o=F0lu?= In-Reply-To: <9874aea0712140014u4c1891dejf550db82bbc0a18e@mail.gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Cc: freebsd-acpi@freebsd.org Subject: Re: energy mesaurement X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Dec 2007 11:56:01 -0000 On Fri, 14 Dec 2007, [ISO-8859-9] cihan kömeçoğlu wrote: > I need to mesaure laptop's energy. > How can I do? I searched any program but I can't find. The best way is to borrow an inline or clamp wattmeter to actually measure real power usage of your laptop + adaptor/charger in use. 'acpiconf -i0' (assuming battery #0) should tell you quite a bit about present entire power usage in milliWatts, while running on battery. You may need to take several readings with one load, there's some time lag. I think 'Present rate' while charging refers to battery charging rate rather than usage, or perhaps it includes usage too. Assuming your laptop runs ACPI and has cpu frequency control, you can run 'powerd -v' in foreground mode in a console for a given interval, say 10 minutes, and when you exit powerd by ^C you'l be told how many Joules have been used (by the CPU anyway). I don't know the conversion factor between Joules and Watt-hours. CPU usage may or may not indicate something like half of the total power consumed by the laptop - it does on my T23 when running at full speed anyway, but it's not really modern. 'sysctl dev.cpu.0.freq_levels' shows CPU power usage at each of the various speeds, in milliWatts. Failing that, you'll have to rely on manufacturer's specs, or methods like dividing the battery's rated capacity by how long it will run the machine, but that depends on battery condition (see acpiconf -i0 again) HTH, Ian