Linux htop 用來查看服務器的系統狀態,會比 top 來的清楚,不過 htop 不是 Linux 內建的指令,需要額外安裝。
安裝方法如下:
centos 系統
yum install htop
debian / ubuntu 系統
apt-get install htop
如果源里沒有,可以自行編譯安裝:
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz tar xvfz ncurses-5.9.tar.gz cd ncurses-5.9 ./configure make make install wget http://sourceforge.net/projects/htop/files/htop/0.9/htop-0.9.tar.gz tar zxvf htop-0.9.tar.gz cd htop-0.9 ./configure make make install
使用 top 查看系統:
使用 htop 查看系統,是不是比較清楚了:
執行 htop 後,還有幾個選項可以操作:
- F2: 進行參數設定,可以自定義選項
- F3: 搜尋你想要看的 process 狀態,輸入進程的名字然後 Enter 搜索
- F5: 進行樹狀排序,這樣你就可以清楚知道那個 child 是由那個 parent 所 fork 出來的
- F6: 排序
- F10: 離開
參考資料 :http://linoxide.com/linux-command/linux-htop-command/
Latest posts by HelloROOT (see all)
- 命不該絕的網站 – HelloROOT - 2019-04-14
- WordPress Simplicity 佈景主題 - 2019-04-14
- 更換 OceanWP blogger 主題佈景 - 2018-02-05