Open s4y opened 3 years ago
I was looking into this and I'm afraid it will not work. The SMC is specific to Intel-based Macs. The good news is that, probably, the new Macs will have something quite similar. I'm hoping that the same approach with a few adjustments will work.
Update: this does work on new M1-based Macs. The only sensor that appears from the currently-supported set is PSTR (total power), but it looks like the SMC interface is the same and there are a number of new sensors which I have to go through.
I've noticed that it only works when I build it for x86, though. If I build a native version no sensors are detected. I'm not sure what's going on yet, open to ideas.
This is wonderful news! I’m afraid I can’t really help because I don’t have access to an m1-based Mac but I’m really looking forward to seeing it working
Hi! I'm looking into measuring energy consumption in ARM-based devices and I saw this tool so I was curious. Could you please let me know if this is indeed working on Apple Silicon? If you need testing, I am willing to help out :)
Hi @maufadel I don't think it's working as is, but @s4y might have more details.
I think nowadays there are some solutions out there. For example, the Mx Power Gadget is a port of the Intel Power Gadget. I'm compiling a list of tools here: https://luiscruz.github.io/2021/07/20/measuring-energy.html If you come across any interesting profiling tool for M1 please let me know.
Hi @luiscruz, thank you for your reply, and sorry for replying so late! I have seen your article and I've found it very useful. I hadn't read about the Mx Power Gadget tool though; I will test it because it seems interesting. I have recently started my PhD and the idea for my thesis is to monitor and improve the energy consumption of software solutions in Cloud and Edge. For now, I'm focusing on finding an approach that allows monitoring the consumption of applications in multi-platform scenarios, e.g., we might have an application that has multiple components that are deployed on Edge and Cloud, so to monitor the energy usage we need to get energy metrics from Raspberry Pis, Edge nodes, and AWS. Would you happen to know of any tool that would allow me to do this? Thank you once again!
It’s unknown whether this works (or can be made to work) on newer Macs.