get battery status on the command line
#1
Apologies for the newbie question, but I've been stymied on this so far-- what's a good way to get the PBP battery status (percentage or time remaining, plugged in or on battery, etc) on the command line? 

If it matters, I'm on Manjaro 20.04.
#2
(04-04-2020, 06:10 PM)rossk Wrote: Apologies for the newbie question, but I've been stymied on this so far-- what's a good way to get the PBP battery status (percentage or time remaining, plugged in or on battery, etc) on the command line? 

If it matters, I'm on Manjaro 20.04.

On Manjaro,  you can use the tlp-stat  command: tlp-stat -b gives basic battery info.  tlp-stat --help gives further explanations/possibilities.  

You can also cat some of the files in the /sys/class/power_supply/cw2015-battery directory.  

There are other programs that will give battery  statistics if those ideas don't work for you.  Just web  search on something like 

"linux battery statistics from console".
#3
(04-04-2020, 06:31 PM)belfastraven Wrote:
(04-04-2020, 06:10 PM)rossk Wrote: Apologies for the newbie question, but I've been stymied on this so far-- what's a good way to get the PBP battery status (percentage or time remaining, plugged in or on battery, etc) on the command line? 

If it matters, I'm on Manjaro 20.04.

On Manjaro,  you can use the tlp-stat  command: tlp-stat -b gives basic battery info.  tlp-stat --help gives further explanations/possibilities.  

You can also cat some of the files in the /sys/class/power_supply/cw2015-battery directory.  

There are other programs that will give battery  statistics if those ideas don't work for you.  Just web  search on something like 

"linux battery statistics from console".

Yeah-- most of the answers I got from general searches like that, weren't giving me useful results (things like the acpi tools, which aren't helpful on the PBP).

but, /sys/class/power_supply/cw2015-battery/ is exactly what I was looking for. Thanks!


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is the same DD command appropriate for writing EMMC and SD cards wpeckham 4 142 09-23-2021, 09:19 PM
Last Post: KC9UDX
  Enabling spekaer/Connecting to bluetooth from command line axisarm 1 243 08-06-2021, 04:29 PM
Last Post: nfms
  Battery gauge issue (mainline kernel) lfourquaux 4 1,105 05-22-2021, 02:43 PM
Last Post: jiyong
  eMMC frequently not found by Linux kernel (especially on low battery) v-man 14 6,875 05-14-2021, 01:18 PM
Last Post: djhnsn
  Battery charge threshold xNix 1 624 04-17-2021, 07:13 AM
Last Post: Damon
Question Manjaro arm + sway - battery indicator broken mfashby 6 2,063 02-20-2021, 04:07 AM
Last Post: mfashby
  Status stonepound 0 694 11-18-2020, 01:35 PM
Last Post: stonepound
  Possible battery and performance improvement xehartnort 4 2,216 11-09-2020, 12:26 AM
Last Post: rimaille
  Manjaro - No battery info after plugged in AlecM 4 2,739 09-16-2020, 08:34 PM
Last Post: zer0sig
  CPU Configuration and Status Scripts for PBP/Linux Syonyk 2 1,702 06-26-2020, 08:53 AM
Last Post: Syonyk

Forum Jump:


Users browsing this thread: 1 Guest(s)