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

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

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)

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄