ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Check battery status in Linux

    IT Discussion
    linux laptop battery cli
    3
    5
    847
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gjacobseG
      gjacobse
      last edited by gjacobse

      Wondered if there was a way to check the status of the laptop battery via the CLI. .. quick search - yup... it's upower

       upower -i `upower -e | grep 'BAT'`
        native-path:          BAT0
        vendor:               ASUS
        model:                1000HE
        power supply:         yes
        updated:              Fri 25 May 2018 09:16:02 AM EDT (47 seconds ago)
        has history:          yes
        has statistics:       yes
        battery
          present:             yes
          rechargeable:        yes
          state:               discharging
          warning-level:       none
          energy:              29.1384 Wh
          energy-empty:        0 Wh
          energy-full:         54.3528 Wh
          energy-full-design:  62.64 Wh
          energy-rate:         9.1728 W
          voltage:             7.306 V
          time to empty:       3.2 hours
          percentage:          53%
          capacity:            86.7701%
          technology:          lithium-ion
          icon-name:          'battery-good-symbolic'
        History (charge):
          1527254162  53.000  discharging
        History (rate):
          1527254162  9.173   discharging
      
      upower -i $(upower -e | grep BAT) | grep --color=never -E "state|to\ full|to\ empty|percentage"
          state:               discharging
          time to empty:       2.9 hours
          percentage:          54%
      

      Source

      1 Reply Last reply Reply Quote 4
      • momurdaM
        momurda
        last edited by momurda

        Is that also showing battery degradation as
        energy-full-design, energy-full, and capacity parameters?
        Or do they not mean what their obvious name means?

        1 Reply Last reply Reply Quote 1
        • gjacobseG
          gjacobse
          last edited by

          Wished I could upvote my own posts... knew I had started this thread,.. and helps me keep up with my linux CLI history.

          Doing more and more via CLI - so this helps.

          1 Reply Last reply Reply Quote 1
          • RamblingBipedR
            RamblingBiped
            last edited by

            I recommend this: https://github.com/tmux-plugins/tmux-battery

            gjacobseG 1 Reply Last reply Reply Quote 0
            • gjacobseG
              gjacobse @RamblingBiped
              last edited by

              @ramblingbiped said in Check battery status in Linux:

              I recommend this: https://github.com/tmux-plugins/tmux-battery

              Will have to give it a look.

              Thanks

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post