Index of /andrejciho/Linux/My processor/battery info script

Name Last modified Comments Description

Back Parent Directory

My processor/battery info script

So here's my code as Topher requested. It basically shows me info about processor speed, temperature (in Farenheit and Celsius), battery life, etc.
echo " CPU running at "`cpufreq-info -fm`
acpi -tB
acpi -tBf
echo " "
acpi -b
echo " "`acpi -aTB`
echo " "`more /proc/acpi/battery/BAT0/info | grep -i "design capacity:"`
echo " "`more /proc/acpi/battery/BAT0/info | grep -i "last full capacity:"`
DESIGN=`more /proc/acpi/battery/BAT0/info | grep -i "design capacity:" | gawk '{print $3}'`
LAST=`more /proc/acpi/battery/BAT0/info | grep -i "last full capacity:" | gawk '{print $4}'`
PERCENTAGE=$(echo "scale=2; (${LAST}/${DESIGN})*100" | bc -l)
PERCENTAGE=$(echo "scale=0; ${PERCENTAGE}" | bc -l)
echo " last real charge: ${PERCENTAGE}%"

and this is what I get on my computer:
CPU running at 800 MHz
Thermal 1: ok, 46.0 degrees C
Thermal 1: ok, 114.8 degrees F
Battery 1: discharging, 99%, 02:09:38 remaining
AC Adapter 1: off-line
design capacity: 4800 mAh
last full capacity: 3539 mAh
last real charge: 73.00%


Leave a Comment
*Required
*Required (Never published)
 

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image