Linux查看內(nèi)存情況
1.CPU占用最多的前10個(gè)進(jìn)程
ps auxw|head -1;ps auxw|sort -rn -k3|head -10
2.內(nèi)存消耗最多的前10個(gè)進(jìn)程
ps auxw|head -1;ps auxw|sort -rn -k4|head -10
3.虛擬內(nèi)存使用最多的前10個(gè)進(jìn)程
ps auxw|head -1;ps auxw|sort -rn -k5|head -10
4.也可以試試
ps auxw --sort=rss ps auxw --sort=%cpu
5.看看幾個(gè)參數(shù)含義
- %MEM 進(jìn)程的內(nèi)存占用率
- MAJFL is the major page fault count,
- VSZ 進(jìn)程所使用的虛存的大小
- RSS 進(jìn)程使用的駐留集大小或者是實(shí)際內(nèi)存的大小(RSS is the "resident set size" meaning physical memory used)
- TTY 與進(jìn)程關(guān)聯(lián)的終端(tty)
轉(zhuǎn)自:https://www.linuxprobe.com/linux-sort-max-mc.html
原創(chuàng)地址:https://www.linuxprobe.com/linux-sort-max-mc.html

浙公網(wǎng)安備 33010602011771號(hào)