034每个进程占用内存排序

一、

   # ps -aux|head -n 2
   USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
   root 1 0.0 0.0 196332 13704 ? Ss Jun06 121:46 /usr/lib/systemd/systemd --switched-root --system --deserialize 17

#按cup/内存排序
ps -aux | sort -rnk 3 | head -20  (3为按cpu排序,4为按内存排序)

 

Reference: https://www.cnblogs.com/dgp-zjz/p/11228463.html

 

posted @ 2022-09-19 08:35  arun_yh  阅读(53)  评论(0编辑  收藏  举报