-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sudoless power metrics on Apple Silicon #731
Comments
Thanks to let us know about it ! |
Hi, if you want to adapt macmon into your project, I think I can split the metrics collection part into the library. I've seen that some projects are now copying the metrics collection code, but Apple continuously changing their APIs on new chips, so the copied code become irrelevant. |
I think it's great ! I didn't find this tool when I first implemented the Powermetrics feature. I am currently refactoring the Powermetrics code to add better RAM support so now might be a good time to check this out |
Hi @vladkens I see you're the creator of macmon. We are not going to copy the code rather use your library, that way we can rely on you maintaining it working :) |
Hi. There are no technical limitations, I just need to check which keys can provide this information. Most likely, there shouldn't be any issues with this. I also have a few questions regarding the library. I am currently thinking about how to make I’m curious about which APIs you would like to have. Right now, I essentially have one "public" function: Also, as I understant, |
Most of the estimation apps we use don't have python binding, we run them as CLI tools using |
@LuisBlanche, If you use subprocess, it's much easier 😄. I added the ability to choose the sample count and include RAM power to output (also added GPU RAM power, but only after I did release I remembered that Mac uses unified memory, so I'm not sure what this parameter actually means). Available from version v0.4.2. Also, added docs for output data. macmon pipe -s 10 -i 500 | jq Note: |
Since #464 was closed, there is a new option for obtaining power metrics on Apple Silicon chips that does not require sudo: https://github.com/vladkens/macmon by @vladkens.
I am not affiliated with the project, but found it after discovering that codecarbon currently requires sudo privileges on macOS for full functionality (as documented in the CPU section of the docs on power usage). This limits its use on managed computers, e.g. in a university setting.
macmon appears to be actively maintained and also has an MIT license, so a promising tool to build on. Hopefully someone will be able to look into this further.
The text was updated successfully, but these errors were encountered: