asitop
asitop copied to clipboard
Support macOS 13
I changed the bandwidths to disk r/w and network i/o.
I think those are more useful, and they avoided the problem that bandwiths are not available on macOS 13.
Thanks for the PR. It’s finally working again!
About the i/o bandwidth changes. I don’t think they belong in here. The focus on asitop was entirely on the SoC and IMO, I think it should stay that way. Nothing wrong with removing the bandwidth section entirely.
BTW, not related to this but it seems like it’s underreporting power usage by about 5 watts or Ventura is being more power efficient. I can create a consistent load and it used to use up 7w. Now it’s down to 2w.
The graph is way off as well.
About the i/o bandwidth changes. I don’t think they belong in here. The focus on asitop was entirely on the SoC and IMO, I think it should stay that way.
Good point! But what do you think should belong here? Those are as far as I can get. Looking for ideas!
it seems like it’s underreporting power usage by about 5 watts
I indeed made some changes to that. The package power key is no longer available under macOS 13, but I saw a combined power, and I used it without further investigation.
:thinking:
What does combined power mean and what's the different between that and package power? Maybe someone could shed some light on that?
The graph is way off as well.
Your GPU load is high, that's correct; but its frequency is very low --- The lowest frequency, as far as I know. So maybe it's normal that its power consumption is low.
BTW, I remember seeing something like 6MHz or 9MHz GPU on macOS 12. However, on macOS13 the powermetrics just never report these frequencies. powermetrics would report the portion of time of each frequency, and 9MHz simply isn't on that list. I don't know what happened...
Good point! But what do you think should belong here? Those are as far as I can get. Looking for ideas!
I wouldn’t mind if the section was removed entirely. Bandwidth was really useful and I’m sad to see it go but a possible replacement could be a swap memory graph. It would be in the perfect spot under memory. It shouldn’t be that big though since I seldom swap, lol. but it seems like it could be useful extension of the memory even though it’s not related to the SoC.
I indeed made some changes to that. The
package powerkey is no longer available under macOS 13... What doescombined powermean and what's the different between that andpackage power? Maybe someone could shed some light on that?
Package power I think included the memory controller. Possibly other components but I’m not certain. Combined power sums up cpu, gpu and ane according to powermetrics output.
CPU Power: 295 mW
GPU Power: 50 mW
ANE Power: 0 mW
Combined Power (CPU + GPU + ANE): 345 mW
asitop often shows the “Package Power” being lower than CPU Power. They don’t add up so I don’t think it’s only because of the change to combined power.
Your GPU load is high, that's correct; but its frequency is very low --- The lowest frequency, as far as I know. So maybe it's normal that its power consumption is low.
BTW, I remember seeing something like 6MHz or 9MHz GPU on macOS 12. However, on macOS13 the
powermetricsjust never report these frequencies.powermetricswould report the portion of time of each frequency, and 9MHz simply isn't on that list. I don't know what happened…
That makes sense. I know Activity Monitor can be misleading but the discrepancy between Activity Monitor and asitop was never to this degree.
Just wanted to pipe up as a user, unsolicited; the memory bandwidth area was quite useful, particularly for gaining some visibility into what the media engine is up to. Understand if it goes away based on reading here, but it would be nice if there is some other way to peek into media engine usage in particular.
Temporary files in /tmp not being deleted on start up. Get the error on startup:
rm: "/tmp/asitop_powermetrics1666643878": No such file or directory rm: "/tmp/asitop_powermetrics1666646351": No such file or directory rm: "/tmp/asitop_powermetrics1666646428": No such file or directory
Well, that’s a little problem. I changed os.rmfile to subprocess.Popen(“sudo rm …”) so that you can run asitop without sudo. This makes debugging easier. But I don’t think it means that the files are not being deleted; it means that they have already been deleted by the OS (I guess). Temporary files in /tmp not being deleted on start up. Get the error on startup: rm: "/tmp/asitop_powermetrics1666643878": No such file or directory rm: "/tmp/asitop_powermetrics1666646351": No such file or directory rm: "/tmp/asitop_powermetrics1666646428": No such file or directory
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Well, that’s a little problem. I changed os.rmfile to subprocess.Popen(“sudo rm …”) so that you can run asitop without sudo. This makes debugging easier. But I don’t think it means that the files are not being deleted; it means that they have already been deleted by the OS (I guess). Temporary files in /tmp not being deleted on start up. Get the error on startup: rm: "/tmp/asitop_powermetrics1666643878": No such file or directory rm: "/tmp/asitop_powermetrics1666646351": No such file or directory rm: "/tmp/asitop_powermetrics1666646428": No such file or directory —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Noted the change made and yes definitely makes debugging easier but checked the directory:
-rw-r--r-- 1 root wheel 627583 24 Oct 21:38 /tmp/asitop_powermetrics1666643878
-rw-r--r-- 1 root wheel 0 24 Oct 22:19 /tmp/asitop_powermetrics1666646351
-rw-r--r-- 1 root wheel 117439 24 Oct 22:20 /tmp/asitop_powermetrics1666646428
-rw-r--r-- 1 root wheel 0 24 Oct 22:20 /tmp/asitop_powermetrics1666646439
Tried on my MBA and MSU and I get the same results after the first execution.
Tried the following fix which seems to work:
cmd = ["sudo", "rm"]
files = glob.glob("/tmp/asitop_powermetrics*")
if files:
args = cmd + files
subprocess.Popen(args)
Package power I think included the memory controller. Possibly other components but I’m not certain. Combined power sums up cpu, gpu and ane according to powermetrics output.
CPU Power: 295 mW GPU Power: 50 mW ANE Power: 0 mW Combined Power (CPU + GPU + ANE): 345 mWasitop often shows the “Package Power” being lower than CPU Power. They don’t add up so I don’t think it’s only because of the change to
combined power.
I think you are spot on. I now have the suspicion that powermetrics never really reported the actual package power (as in, SoC power), in the old versions it was CPU+GPU+ANE+DRAM but it was still missing the power usage of the interconnect and other processors. So they probably renamed it to make it less confusing. Rather annoying that they dropped the DRAM info at the same time, that was really useful.
I have a genius (stupid) idea. Can we use the powermetrics binary from macOS 12 directly on macOS 13? Are all the system calls still there?
Well, that’s a little problem. I changed os.rmfile to subprocess.Popen(“sudo rm …”) so that you can run asitop without sudo. This makes debugging easier. But I don’t think it means that the files are not being deleted; it means that they have already been deleted by the OS (I guess). Temporary files in /tmp not being deleted on start up. Get the error on startup: rm: "/tmp/asitop_powermetrics1666643878": No such file or directory rm: "/tmp/asitop_powermetrics1666646351": No such file or directory rm: "/tmp/asitop_powermetrics1666646428": No such file or directory —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
Noted the change made and yes definitely makes debugging easier but checked the directory:
-rw-r--r-- 1 root wheel 627583 24 Oct 21:38 /tmp/asitop_powermetrics1666643878 -rw-r--r-- 1 root wheel 0 24 Oct 22:19 /tmp/asitop_powermetrics1666646351 -rw-r--r-- 1 root wheel 117439 24 Oct 22:20 /tmp/asitop_powermetrics1666646428 -rw-r--r-- 1 root wheel 0 24 Oct 22:20 /tmp/asitop_powermetrics1666646439Tried on my MBA and MSU and I get the same results after the first execution.
Tried the following fix which seems to work:
cmd = ["sudo", "rm"] files = glob.glob("/tmp/asitop_powermetrics*") if files: args = cmd + files subprocess.Popen(args)
Now fixed.
asitop often shows the “Package Power” being lower than CPU Power.
This never happened to me.
The code for package power is at file parsers.py line 128. Maybe you could check it out yourself. My favorite way of seeing what keys are available is by setting breakpoints :D
I have a genius (stupid) idea. Can we use the powermetrics binary from macOS 12 directly on macOS 13? Are all the system calls still there?
This actually works. I assumed it wouldn’t and didn’t try until I was informed by someone who actually tried it. So, if you have a copy of Monterey, you can copy it over to Ventura.
What I did was rename it to powermetrics@12 and throw it into a bin folder in my home directory. ~/.local/bin/powermetrics@12, need to add a path in your .zshrc file so it reads it. asitop needs to be modified to call it.
It’s not something that can be included with asitop so it’s something you have to fix locally.
Wow!
I think we can let asitop download that thing automatically. macOS 12 won’t change anymore, so powermetrics would be in a fixed position in the recovery image I guess. Would that be possible?
Well, most importantly, are memory bandwidths available?
The license isn't compatible and it can’t be hosted on GitHub. And yes, memory bandwidth is working again.
The license isn't compatible and it can’t be hosted on GitHub.
Yeah but I think it's ok to download it from apple. We can write the script to download from Apple.
This actually works. I assumed it wouldn’t and didn’t try until I was informed by someone who actually tried it. So, if you have a copy of Monterey, you can copy it over to Ventura.
Thats kinda amazing, Windows users can only wish! Maybe a cli flag could be added to invoke a custom powermetrics binary to facilitate those that have access to a Monterey image.
Hi there - it seems googling for asitop & Ventura support it leads to this PR.
I figure until it gets merged/fixed and someone still wants to run/test asitop on Ventura this can be of use:
➜ pip remove asitop # remove original install
➜ pip install git+ssh://[email protected]/SuperKenVery/asitop.git # install asitop directly from this PR
Can we merge this in?
@SuperKenVery
FYI I can invoke the sudo powermetrics on my local machine running Ventura without any issue.
I didn't download anything. My Ventura is upgraded from Monterey.
And please keep the memory bandwidth or make a command line args for replacing the memory bandwidth with disk bandwidth.
Yeah powermetrics runs but doesn’t report memory bandwidth anymore, at least on my machine. One of our ideas is to run macOS 12’s powermetrics on macOS 13 but I haven’t had time to verify/work on that. 发自我的 iPhone在 2022年12月10日,22:40,nlgtuankiet @.***> 写道: @SuperKenVery FYI I can invoke the sudo powermetrics on my local machine running Ventura without any issue. I didn't download anything. My Ventura is upgraded from Monterey. And please keep the memory bandwidth or make a command line args for replacing the memory bandwidth with disk bandwidth.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>