htop
htop copied to clipboard
CPU Frequency shows as "N/A" on macOS 10.14 Catalina 2015 MacBook Pro 4 core, 8 thread.

Not sure if it's a known issue or something that I'm maybe doing wrong. Anyway, thought I'd post it to get some feedback.
Thanks!
Based on this part of the code this does not seem to be implemented on MacOS yet.
Thanks for the feedback @BenBE! Now that we know should we close this or add something about compatibility in the docs. Your call. Thanks.
I think we should keep it open marking it as a feature request/enhancement request to support these information on MacOSX. Simply closing it doesn't feel right for two reasons: First you either should provide the information properly or second don't offer the option to show them if unsupported. As it is now it's in a half-baked state where it should be improved.
Beauty! Thanks for your help!
hint: https://stackoverflow.com/questions/9948987/detect-current-cpu-clock-speed-programmatically-on-os-x
hint: https://stackoverflow.com/questions/9948987/detect-current-cpu-clock-speed-programmatically-on-os-x
The tl;dr version of this is: Not really possible to get anything but the default frequency on MacOS without very low level measurement loops (which would break again as Apple goes ARM).
Shall we disable the option when compiling for MacOS (and other platforms where we can't get the data well)?
Disabling/hiding that option for unsupported platforms is probably best.
The macOS built in powermetrics cli tool is able to show cpu frequency and a lot more information (P/E cluster usage etc.).
The macOS built in
powermetricscli tool is able to show cpu frequency and a lot more information (P/E cluster usage etc.).
Do you have a source code reference for this tool to look at?
You can take a look at https://www.unix.com/man-page/osx/1/powermetrics/
You can take a look at https://www.unix.com/man-page/osx/1/powermetrics/
That's not exactly "source code" that could be any reference for an implementation AFAICS …
You can get the CPU frequency on macOS ARM:
sudo /usr/bin/powermetrics -s cpu_power -n 1

@BenBE this looks helpful: https://github.com/freedomtan/test-ioreport
Hi folks!
I just submitted #1272 that implements this for Apple Silicon. I only have vanilla M1 and M2 machines, so if any of you have Pro/Max and especially Ultra versions, and could give this a spin, it would be very helpful. If you can, please also test it with maximum CPU (using something like Endurance) and see if the maximum frequencies and number of P/E cores make sense.