From owner-freebsd-current@FreeBSD.ORG Fri Jul 29 13:32:15 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23E6A16A41F for ; Fri, 29 Jul 2005 13:32:15 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E1D243D46 for ; Fri, 29 Jul 2005 13:32:14 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id j6TDWDQq006927; Fri, 29 Jul 2005 08:32:13 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <42EA2FD7.7020409@centtech.com> Date: Fri, 29 Jul 2005 08:32:07 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050603 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben Kaduk References: <47d0403c05072817251d3c965a@mail.gmail.com> <42E99222.8090406@centtech.com> <47d0403c050728231367f52d3b@mail.gmail.com> <47d0403c050728231474826d5@mail.gmail.com> In-Reply-To: <47d0403c050728231474826d5@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.82/997/Fri Jul 29 03:07:29 2005 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-current@freebsd.org Subject: Re: hw.acpi.battery.time reports inconsistent values 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: Fri, 29 Jul 2005 13:32:15 -0000 Ben Kaduk wrote: > On 7/29/05, Eric Anderson wrote: > >>Ben Kaduk wrote: >> >>>Hi all -- I don't know whether or not this is related to the recent >>>battery rework, but I'm running >>>prolepsis# uname -a >>>FreeBSD prolepsis.math.uiuc.edu 7.0-CURRENT FreeBSD 7.0-CURRENT #5: >>>Thu Jul 28 07:42:25 UTC 2005 >>>kaduk@prolepsis.math.uiuc.edu:/usr/obj/usr/src/sys/PROLEPSIS i386 >>>and this afternoon I had my laptop running off its battery (basically >>>as a jukebox), which is somewhat unusual since normally I plug it in. >>>I wanted to see how >>>fast I was draining the battery, so I did some `sysctl >>>hw.acpi.battery'-ing (see transcript below), and then proceeded to get >>>very confused. >>> >>>Is there a known race in this sysctl code, or should I be looking for >>>something else (like a broken acpi)? >> >>Re-cvsup and rebuild - Nate Lawson committed a fix for this today, after >>your build that fixed me up. >> >>Eric >> >> >> >> >>-- >>------------------------------------------------------------------------ >>Eric Anderson Sr. Systems Administrator Centaur Technology >>Anything that works is better than anything that doesn't. >>------------------------------------------------------------------------ >>_______________________________________________ >>freebsd-current@freebsd.org mailing list >>http://lists.freebsd.org/mailman/listinfo/freebsd-current >>To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" >> > > > Thanks for the pointer, Eric -- I probably read the commit message as > I was compiling! I rebuild (with NOCLEAN) world, and there seems to > be > a difference, in that I'm no longer getting insane values for > hw.acpi.battery.time, but I'm not entirely sure that it's fully fixed > -- its behaviour over time is not particularly monotone, but as I > mentioned earlier, I don't often run this machine off the battery, so > I don't know if this behaviour is normal: > > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 99 > hw.acpi.battery.time: -1 > hw.acpi.battery.state: 0 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 99 > hw.acpi.battery.time: -1 > hw.acpi.battery.state: 0 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 99 > hw.acpi.battery.time: -1 > hw.acpi.battery.state: 0 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 99 > hw.acpi.battery.time: 147 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 99 > hw.acpi.battery.time: 147 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 99 > hw.acpi.battery.time: 147 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 96 > hw.acpi.battery.time: 91 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 96 > hw.acpi.battery.time: 108 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expirbash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 96 > hw.acpi.battery.time: 108 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 96 > hw.acpi.battery.time: 89 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 96 > hw.acpi.battery.time: 89 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 96 > hw.acpi.battery.time: 90 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 92 > hw.acpi.battery.time: 90 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 92 > hw.acpi.battery.time: 90 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 92 > hw.acpi.battery.time: 90 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 92 > hw.acpi.battery.time: 105 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.bash-2.05b$ sysctl hw.acpi.battery > hw.acpi.battery.life: 92 > hw.acpi.battery.time: 105 > hw.acpi.battery.state: 1 > hw.acpi.battery.units: 2 > hw.acpi.battery.info_expire: 5 > battery.info_expire: 5 > > > > Is this magnitude fluctuation normal (depending on the instantaneous > load on the machine)? Yea, for me, I see that kind of flux all the time when I'm using the machine.. I think you can change the sampling rate in order to level the spikes out. If you let the machine sit very idle, it shouldn't change much at all. # sysctl -d hw.acpi.battery.info_expire hw.acpi.battery.info_expire: time in seconds until info is refreshed # sysctl hw.acpi.battery.info_expire=10 hw.acpi.battery.info_expire: 10 -> 10 Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------