查看線程運行cpu方法

htop

筆者運行環境爲cetos,安裝:

1、上官網http://hisham.hm/htop/releases/下載最新的包
2、解壓縮:tar -zxvf htop-2.0.2.tar.gz;
3、進入目標文件夾: cd htop-2.0.2
4、./configure
5、系統若出現以下提示,則需要安裝c編譯環境
configure: error: no acceptable C compiler found in $PATH
安裝c編譯環境:yum -y install gcc
6、裝完c編譯環境後再進行./configure,若出現如下提示,則需要安裝依賴包
configure: error: You may want to use --disable-unicode or install libncursesw.
yum install -y ncurses-devel
7、接下來就是最後的安裝環節:./configure&&make&&make install

設置:

(1)啓動htop後,按F2Setup):
(2) Setup中選擇Columns,然後在Available Columns中選擇PROCESSOR - ID of the CPU the process last executed, 接下來按F5Add)和F10Done)即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章