[Linux] to view the most CPU / MEM process use

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/bible_reader/article/details/97253812

Check CPU / MEM most used process

ps aux | grep -v PID | sort -nrk3 | head -1

ps aux: ps status inquiry process

grep -v PID: the reverse line contains the PID filter out (because the first row contains the ps command output header, as shown below)

 sort -nrk3: Sort items third column (-K3) value (-n) in descending order (-r)

head -1: taking a first row of data

Guess you like

Origin blog.csdn.net/bible_reader/article/details/97253812