I am writing a script to procedurally measure certain power system parameters.
I am aware of
system_profiler SPPowerDataType. However, this API only updates once a minute and sometimes provides quite different results than iStat.
iStat has a number of different sensors for current draw (amperes), all of which update once per second. It also has a power bus (PBus) voltage which updates once per second.