Linux 終端查看最消耗 CPU 內(nèi)存的進(jìn)程


鏈接:https://cloud.51cto.com/art/202012/633675.html
1.CPU占用最多的前10個進(jìn)程
ps?auxw|head?-1;ps?auxw|sort?-rn?-k3|head?-10

2.內(nèi)存消耗最多的前10個進(jìn)程
ps?auxw|head?-1;ps?auxw|sort?-rn?-k4|head?-10

3.虛擬內(nèi)存使用最多的前10個進(jìn)程
ps?auxw|head?-1;ps?auxw|sort?-rn?-k5|head?-10

4.也可以試試
ps?auxw?--sort=rss
ps?auxw?--sort=%cpu
5.看看幾個參數(shù)含義
%MEM 進(jìn)程的內(nèi)存占用率
MAJFL is the major page fault count,
VSZ 進(jìn)程所使用的虛存的大小
RSS 進(jìn)程使用的駐留集大小或者是實際內(nèi)存的大小(RSS is the "resident 5. set size" meaning physical memory used)
TTY 與進(jìn)程關(guān)聯(lián)的終端(tty)
推薦閱讀:
5T技術(shù)資源大放送!包括但不限于:C/C++,Linux,Python,Java,PHP,人工智能,單片機(jī),樹莓派,等等。在公眾號內(nèi)回復(fù)「1024」,即可免費獲?。?!
評論
圖片
表情
