Find Top 10 Memory Consuming Process
ps -eo pmem,pcpu,pid,args | tail -n +2 | sort -rnk 1 | head
ps : Current process snapshot report
–e : Select all process
o : User defined format
pmem : User defined memory
pcpu : User defined cpu
pid : Process ID number
args : Command
tail -n +2 : Output lines starting to the second line
sort -rnk 1 :reverse (r), numeric sort (n) by column 1 (memory)
head : output the 10 first lines
Objectives
[ ] How Linux Kernel Manages Memory?
Find Top 10 Memory Consuming Process
ps -eo pmem,pcpu,pid,args | tail -n +2 | sort -rnk 1 | head
ps : Current process snapshot report –e : Select all process o : User defined format pmem : User defined memory pcpu : User defined cpu pid : Process ID number args : Command tail -n +2 : Output lines starting to the second line sort -rnk 1 :reverse (r), numeric sort (n) by column 1 (memory) head : output the 10 first lines
Resource
Related
186 #361 #112