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 5,033 09-23-2021, 09:19 PM
Last Post: KC9UDX
  Enabling spekaer/Connecting to bluetooth from command line axisarm 1 2,325 08-06-2021, 04:29 PM
Last Post: nfms
  Battery gauge issue (mainline kernel) lfourquaux 4 5,880 05-22-2021, 02:43 PM
Last Post: jiyong
  eMMC frequently not found by Linux kernel (especially on low battery) v-man 14 19,338 05-14-2021, 01:18 PM
Last Post: djhnsn
  Battery charge threshold xNix 1 2,556 04-17-2021, 07:13 AM
Last Post: Damon
Question Manjaro arm + sway - battery indicator broken mfashby 6 7,872 02-20-2021, 04:07 AM
Last Post: mfashby
  Status stonepound 0 1,904 11-18-2020, 01:35 PM
Last Post: stonepound
  Possible battery and performance improvement xehartnort 4 6,396 11-09-2020, 12:26 AM
Last Post: rimaille
  Manjaro - No battery info after plugged in AlecM 4 6,803 09-16-2020, 08:34 PM
Last Post: zer0sig
  CPU Configuration and Status Scripts for PBP/Linux Syonyk 2 4,194 06-26-2020, 08:53 AM
Last Post: Syonyk

Forum Jump:


Users browsing this thread: 1 Guest(s)