TL;DR — an individual could use something like a kill-a-watt meter, but the OP wanted something with an API. There are other hardware devices that could be used that do have APIs, but the company wants to do this for everyone across multiple countries, and the same solutions might not be available in all countries. So, they cook up a homegrown solution with a cron job that parses the output from ioreg.
I could argue with some of the example CLI tools they use to parse that information, but the overall approach seems sound.
I would be curious to hear what the results are aggregated across the whole company, and also broken down by region over time.
I could argue with some of the example CLI tools they use to parse that information, but the overall approach seems sound.
I would be curious to hear what the results are aggregated across the whole company, and also broken down by region over time.