Le Thursday 07 May 2015 à 21:09 +0200, Stefan Seyfried a écrit :
Am 06.05.2015 um 14:22 schrieb Jean Delvare:
The following should work except for the
"rate" which isn't mentioned in
the sysfs interface. I seem to understand that this isn't considered a
property of the battery so you have to derive it yourself from the the
other numbers over an arbitrary period.
"power_now" is basically what the "rate" was, but it's expressed
microwatts while in /proc it could be either mA or mW IIRC.
Baah, thanks for pointing out the obvious, I must have been
blind :( Whatever the unit is, it's impressively undocumented.
So anyway Gerald's script can be simplified again to:
while read i; do
printf "%5s " "$i"
printf " = %s\n" "$s"
for v in "energy_full_design" "energy_full" "energy_now"
printf "%18s = " "$v"
cat /sys/class/power_supply/BAT*/$v | sum
SUSE L3 Support
To unsubscribe, e-mail: opensuse-kernel+unsubscribe(a)opensuse.org
To contact the owner, e-mail: opensuse-kernel+owner(a)opensuse.org