What's best to measure your computers power consumption: a Smartplug? The sensor in the comupter itself? Some extra measure device?

I bought a Power-Z device: it's not cheap, but has a native Linux driver for measurements.

Results in short: the Power-Z is really nice, and the Macbook pro M2 sensors are surprisingly precise - much better than the internal RAPL readings of the StemDeck. The smartmeter is not bad either.

Details: https://blog.fluxcoil.net/2026/03/comparison-of-computer-power-measurement-methods/

@globalc have you considered that rapl and MacBook sensors might report energy usage without factoring in the efficiency of the power regulation/conversion?

@sec Good point!
The MacBook allows insights there as it exposes access to 3 relevant sensors:
a) is telling us with how much Watt the battery is drained (if it is used)
b) input power consumption (strangely labeled "AC power", but it's PD3.0, DC power.
c) total system consumption

From looking at these, it seems like drain from battery vs. supply from external (which is reporting same consumption as Power-Z) is same. So no loss seen - makes sense, both cases get already DC.

@sec Worth mentioning thou, PD3.0 supply from external is supplying 20V, and internal battery is ~12V. So seems like efficiency for both voltages is comparable.
@sec FWIW, another interesting sensor of the Macbook pro M2 is the one called "Heatpipe
power" in 'lmsensors', the underlying sensor key is PHPC: this is an estimate of the heat energy being dissipated by the SoC.
Would love to chat with the engineers on how they come up with this.. and what the other electrical energy goes into. photons from the screen if turned on.. electromagnetic radiation.
@globalc Funny. I kinda expected the conversion of power to heat be like 99% or so. I mean, other than photons leaving the screen what else is there?
@sec Exactly my thinking.. electromagnetic radiation also coming to mind.. but that's it. But then, the "heatpipe power" is just some magic metric which the firmware hand over to us. The engineers designing that would be the ones to know..
Also how they are using the variable practically.