Mac OS X shell utility that shows individual cpu usage in multi-core systems

﹥>﹥吖頭↗ 提交于 2019-12-09 02:39:54

问题


I've been looking for a osx utility that shows cpu usage for each cpu. For example CPU 0 - 10% CPU 1 - 2% ...

I know of many ways of getting this information in other Unix-like system (/proc, mpstat, etc) but none work in osx. The most useful one for Mac is top but it only shows total cpu usage. I need the application to be run from the shell so that I can log the usage over time. I also tried cpuwalk.d but it only shows you if the application is running in one or more cores.

If you take a look at Activity Monitor app you will notice that it basically displays the same info as top, but with the addition of a graph that shows cpus load.

If anyone has any idea of how to get the information I would appreciate it. Thanks.


回答1:


You can try htop. If you have homebrew installed, simple install it via "brew install htop", after the installation finished, type in htop on the shell.




回答2:


you can download os x hardware monitor src from: https://github.com/max-horvath/htop-osx



来源:https://stackoverflow.com/questions/9743913/mac-os-x-shell-utility-that-shows-individual-cpu-usage-in-multi-core-systems

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!