grep 'physical id' /proc/cpuinfo | sort -u | wc -l
grep 'core id' /proc/cpuinfo | sort -u | wc -l
grep 'processor' /proc/cpuinfo | sort -u | wc -l
upower -i $(upower -e | grep 'BAT') | grep -E "state|to full|percentage"
http://www.cnblogs.com/lizunicon/p/3509539.html
http://www.cnblogs.com/tracyone/p/4034504.html
https://www.cnblogs.com/congbo/archive/2012/09/12/2682105.html
A friendly reminder: since Linux kernel 2.6.24 using /proc
to store ACPI info has been discouraged and deprecated.
Now we are encouraged to use -> /sys/class/power_supply/BAT0
.
UPDATE: Linux 3.19 and onwards, we should look at the following directory -> /sys/class/power_supply/BAT1/
For example capacity -> cat /sys/class/power_supply/BAT1/capacity
status -> cat /sys/class/power_supply/BAT1/status