View Single Post
Posts: 9 | Thanked: 7 times | Joined on Jan 2014 @ Oxford, UK
#2
Cool, thanks for the info! I quickly computed a median over my discharge rate using

Code:
grep discharging /var/lib/upower/history-rate-7.dat | sort -k2 | awk '{ a[i++]=$2; } END { print a[int(i/2)]; }'
My Jolla typically consumes 0.245 Watt being mainly connected to a WiFi and <10h a week via an UMTS data link and used quite a bit for reading news, emails, facebook... So the 7.98Wh battery (2100mAh * 3.8V) should typically last for 32.5h (1.4 days) which is a bit shorter than I observed (2.5 days).

stefan

PS: Computing the mean using the awk command below does bias short intervals with a high consumption too strongly (I get 0.448 Watt) and would suggest that my battery lasts for only 17.8h which is not the case.

Code:
awk '{ if ($3 =="discharging") sum += $2 } END { if (NR > 0) print sum / NR }' < /var/lib/upower/history-rate-7.dat
PPS: If you look for the smallest discharge rate you see 0.011 Watt in the history which would result in 725h (30 days) .

Code:
grep discharging /var/lib/upower/history-rate-7.dat | sort -k2 | head
 

The Following User Says Thank You to strahl For This Useful Post: