3

I'm trying to collect information on power usage of our Apple (for now macOS only) devices. I came across some good posts and was already able to read out the AppleSmartBattery object via ioreg. That already would help me to determine if it is a laptop or a desktop model. But is is actually pretty hard to get more detailed information around the actual power drain. I'm less interested if a device runs on battery but actually more on the consumption if it is connected to a charger. I found the child object of PowerTelemetryData which contains a lot of interesting information but have no real clue how to interpret the data (reformatted for better readability).

$ /usr/sbin/ioreg -rc AppleSmartBattery | grep PowerTelemetryData
      "PowerTelemetryData" = {
         "WallEnergyEstimate"=2305,
         "AccumulatedSystemPowerIn"=28547763,
         "AdapterEfficiencyLossAccum ulatorCount"=3586,
         "AccumulatedWallEnergyEstimate"=9196925,
         "SystemInputVoltage"=12145,
         "SystemPowerInAccumulatorCount"=3586,
         "SystemEnergyConsumed"=1987,
         "SystemPowerIn"=7156,
         "SystemLoad"=7576,
         "PowerTelemetryErrorCount"=0,
         "AccumulatedSystemLoad"=28544320,
         "SystemLoadAccumulatorCount"=3587,
         "AccumulatedSystemEnergyConsumed"=7928273,
         "AdapterEfficiencyLoss"=318,
         "SystemInputCurrent"=588,
         "AccumulatedAdapterEfficiencyLoss"=1268652
   }

From what I can see there is already some items which are pretty interesting, e.g. WallEnergyEstimate, AccumulatedWallEnergyEstimate or SystemEnergyConsumed. But have no clue in what unit of measure these read outs actually are and couldn't find any (even non-official) documentation. Is there anyone that can help?

1
  • Validating with a friend I figured out that this object is only available on Ventura. Commented Feb 20, 2023 at 16:22

1 Answer 1

1

And playing around with all the data it seems that it is pretty self-explanatory. For almost all values you might assume the prefix of milli – so millivolt, milliampere, milliwatt.

  • SystemInputCurrent is the currently measured current in milliampere
  • SystemInputVoltage is the currently measured voltage in millivolt
  • If you multiply those and divide by 1000 (to eliminate one milli) you get roughly the value of SystemPowerIn measured in milliwatt

And actually one of the most interesting fields is AccumulatedSystemEnergyConsumed which gives you the total amount of energy consumed measured in Joules. So actually dividing this by 3,600,000 will give you the amount of kWh your machine consumed since ??? (I guess it is ever).

Found the answer – so closing this question. But will need to look for a different approach that also works on older macOS versions.

1
  • AccumulatedSystemEnergyConsumed seems to be milliJoules The difference between to updates divided by the update time of 60s is SystemEnergyConsumed in mW. And SystemEnergyConsumed + AdapterEfficiencyLoss = WallEnergyEstimate Commented Aug 27 at 10:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .