asitop
asitop copied to clipboard
Implement M3 (Max) in asitop
This patch does a couple things:
(1) Implements M3 Max support (at least for the 16 core CPU/40 core GPU version) 128GB version with 400MHz memory bandwidth) - the max power numbers are taken from my system driving CPU and GPU usage to absolute maximum and reading out from powermetrics.
(2) In order to calculate the average CPU usage across cores, I had to redo that whole section. On M3 Max, powermetrics always reports 100% for "E-Cluster online" and "P-Cluster online" for all clusters, regardless of how busy they are. So those basically can't be trusted/used. Instead, I just iterate through all the individual cores and average them. For the MHz, the clusters do report a frequency but it's not at all clear what the freq is when comparing it to the individual cores in that cluster. So instead of using those, and because there's multiple P-clusters anyway, I had to do an "average" - so what I decided to do was take each core's frequency, weighted by that core's activity %age - so the more active, the more that frequency contributes to the "average". This gives a sense, alongside the overall activity %age, of how hard the CPUs are actually working, kinda. It's not great, but it's better than nothing.
Hi. This repository looks inactive, I have developed an alternative solution that bonus works without sudo.
If anyone is interested: https://github.com/vladkens/macmon