get battery status on the command line - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114) +--- Thread: get battery status on the command line (/showthread.php?tid=9586) |
get battery status on the command line - rossk - 04-04-2020 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. RE: get battery status on the command line - belfastraven - 04-04-2020 (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? 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". RE: get battery status on the command line - rossk - 04-04-2020 (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? 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! |