You are not logged in.
Hello everyone,
I've read that /proc/acpi/battery/BAT0 became deprecated, and has been replaced by /sys/class/power_suply/BAT0... That's ok for me, but since I am using and ION 2 (Optimus) based laptop, I want to see the consumption in mA like when I did this : "grep rate /proc/acpi/battery/BAT0/state". I have tried with "acpi -V" etc.. but I didn't find a good one who gives the same information.
Can anyone help me with this ?
Thanks in Advance,
Luis Da Costa
Offline
you should have a voltage_now and current_now file.
do the math
Offline
Is current_now also volts ?
Offline
Hi
I use an awful script to check my laptop's power consumption. It use upower as backend. If it can help...
#!/bin/bash
CONSO=0
while :
do
sleep 1
WATT=`upower -i /org/freedesktop/UPower/devices/battery_BAT0 | awk '/energy-rate:/{print $2}' | cut -f1 -dW`
TEMPO=$(($TEMPO+1))
CONSO=`echo "scale=2;$WATT+$CONSO" | bc`
case $TEMPO in
10|20|30|40|50)
C=`echo "scale=2;$CONSO/$TEMPO" | bc `
AFF="Power consumption for $TEMPO s :$C W"
;;
60)
C=`echo "scale=2;$CONSO/$TEMPO" | bc `
AFF="Power consumption by min :$C W/min"
CONSO=$C ; TEMPO=0
;;
esac
clear ; echo -n "Wait 10 seconds
$AFF"
done
Offline