Re: hw.acpi.battery.time reports inconsistent values

From: Eric Anderson (anderson_at_centtech.com)
Date: 07/29/05

  • Next message: Pawel Jakub Dawidek: "Re: GELI - disk encryption GEOM class committed."
    Date: Fri, 29 Jul 2005 08:32:07 -0500
    To: Ben Kaduk <minimarmot@gmail.com>
    
    

    Ben Kaduk wrote:
    > On 7/29/05, Eric Anderson <anderson@centtech.com> 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.
    ------------------------------------------------------------------------
    _______________________________________________
    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"
    

  • Next message: Pawel Jakub Dawidek: "Re: GELI - disk encryption GEOM class committed."

    Relevant Pages

    • Re: decreasing interrupt CPU load
      ... HZ interrupts per second? ... After compiling in you did ... enable it with the sysctl? ... To unsubscribe, ...
      (freebsd-performance)
    • disappointing rebuild speed using ggatec and ggated
      ... I'm attempting a RAID 1 mirror with ggatebetween two hosts using ... sysctl net.inet.tcp.sendspace=131072 ... With the following modifications, my rebuild has improved. ...
      (freebsd-questions)
    • sysctl() coding question
      ... sysctl(). ... After some modifications and compiling, I executed the binary and got: ... load.ldavg is of some wicked filetype. ...
      (comp.unix.bsd.openbsd.misc)
    • Re: network stack problem in sparc64?
      ... earendil# sysctl net.inet.udp ... I'm just compiling a kernel with the changes. ...
      (freebsd-hackers)
    • DEVICE_POLLING in 5.3
      ... by compiling the DEVICE_POLLING and HZ=1000 options into ... the kernel. ... concerning device polling in SMP kernels and removed it. ... To finally enable the feature one have to set the sysctl ...
      (freebsd-questions)