I\'m trying to get the power usage (in watts) but I can\'t figure out how. I looked at pmset and IOKit but couldn\'t find anything about it. coconutBattery can calculate it for
/usr/sbin/system_profiler SPPowerDataType | grep Wattage
The utility also accepts an -xml flag; the specific key in the XML is sppower_ac_charger_watts.
-xml
sppower_ac_charger_watts