1. The top 10 processes with the most CPU usage
ps auxw|head -1;ps auxw|sort -rn -k3|head -10
2. The top 10 processes that consume the most memory
ps auxw|head -1;ps auxw|sort -rn -k4|head -10
3. The top 10 processes that use the most virtual memory
ps auxw|head -1;ps auxw|sort -rn -k5|head -10
4. You can also try
ps auxw --sort=rss
ps auxw --sort=%cpu
5. Look at the meaning of several parameters
- %MEM process memory usage
- MAJFL is the major page fault count,
- The size of virtual memory used by the VSZ process
- 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)
- TTY The terminal (tty) associated with the process
The above is the Linux-related knowledge shared by Liangxu Tutorial Network for all friends.