view multi-core or mlti-cpu utlization on linux

左心房为你撑大大i 提交于 2019-12-03 04:12:14

问题


I have a program running on Linux and I need to determine how it is utilizing all the CPUs/cores. Is there any program for viewing this information?


回答1:


When runnging the top command, press f then j to display the P column (last CPU used by process), in addition to the 1 command in top, you should view some multi core occupation informations :)




回答2:


Run the 'top' command and press '1' to see the individual cores.




回答3:


htop shows you the cpu usage of each core in a graphical manner (ncurses).




回答4:


mpstat -P ALL 5 5 >>your.file

You may need to parse this to use it for a presentation, or sum it But read the man page as mpstat has some useful options.




回答5:


Run the 'top' command and press '1' to see the individual core is the best way to see the cpu cores usage .. another option is run cmd- cat /proc/stat to see the cpu cores usage



来源:https://stackoverflow.com/questions/5899227/view-multi-core-or-mlti-cpu-utlization-on-linux

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