linux view process memory usage

1. The top 10 processes with the most CPU usage

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

Linux terminal view the most CPU memory consuming process Linux terminal view the most CPU memory consuming process

2. The top 10 processes that consume the most memory

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

Linux terminal view the most CPU memory consuming process Linux terminal view the most CPU memory consuming process

3. The top 10 processes that use the most virtual memory

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

Linux terminal view the most CPU memory consuming process Linux terminal view the most CPU memory consuming process

4. You can also try

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

5. Look at the meaning of several parameters

  1. %MEM process memory usage
  2. MAJFL is the major page fault count,
  3. The size of virtual memory used by the VSZ process
  4. The size of the resident set used by the RSS process or the size of the actual memory (RSS is the "resident set size" meaning physical memory used)
  5. TTY The terminal (tty) associated with the process

The above is the Linux-related knowledge shared by Liangxu Tutorial Network for all friends.

Guess you like

Origin blog.csdn.net/manongxianfeng/article/details/113116044