1. 程式人生 > >終端查看最消耗CPU內存的進程

終端查看最消耗CPU內存的進程

add mem pad 關聯 sed resid -a 進程 p s

1.CPU占用最多的前10個進程

ps auxw|head -1;ps auxw|sort -rn -k3|head -10

2.內存消耗最多的前10個進程

ps auxw|head -1;ps auxw|sort -rn -k4|head -10

3.虛擬內存使用最多的前10個進程

ps auxw|head -1;ps auxw|sort -rn -k5|head -10

4.其他

ps auxw --sort=rss
ps auxw --sort=%cpu

5.幾個參數的含義

  1. %MEM 進程的內存占用率

  2. MAJFL is the major page fault count,

  3. VSZ 進程所使用的虛存的大小

  4. RSS 進程使用的駐留集大小或者是實際內存的大小(RSS is the "resident 5. set size" meaning physical memory used)

  5. TTY 與進程關聯的終端(tty)

終端查看最消耗CPU內存的進程