码迷,mamicode.com
首页 > 系统相关 > 详细

Linux终端查看最消耗CPU内存的进程

时间:2019-03-09 23:30:41      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:content   图片   count   str   http   ica   img   size   com   

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 set size" meaning physical memory used)
  5. TTY 与进程关联的终端(tty)

Linux终端查看最消耗CPU内存的进程

标签:content   图片   count   str   http   ica   img   size   com   

原文地址:https://www.cnblogs.com/legendjaking/p/10503588.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!