4 ms·
Looking back, I was being a bit too cynical and dismissive. There are of course other factors in a device being eco-friendly, and in practice hotter chips will
by spijdar 6y ago
Looking back, I was being a bit too cynical and dismissive. There are of course other factors in a device being eco-friendly, and in practice hotter chips will tend to use more power unless restrained.
On my intel laptops, I used "powertop" to measure power consumption as reported by the battery. Powertop is an intel specific tool, but I think most batteries will have an entry in linux's sysfs. Here it's under "/sys/class/power_supply/BAT0", where two files "voltage_now" and "current_now" list the voltage and current in microvolts and microamperes.
[eery@darkshire ~]$ cd /sys/class/power_supply/BAT0
[eery@darkshire BAT0]$ cat current_now
269000
[eery@darkshire BAT0]$ cat voltage_now
8423000
So 269,000 µA x 8,423,000 µV is about 2.266 watts.
Measuring while connected to mains/AC power will probably need some kind of physical device to measure the current being pulled by the charger, sadly. Only server grade hardware seem to have built in current meters :(