Saturday, April 15, 2017

Commands to get top memory usage processes in linux

$ ps aux --sort=-%mem | awk 'NR<=10{print $0}'
This will show you top 10 process that using the most memory

$ ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr | head -5
This will give the top 5 processes by memory usage.

$ ps axu | awk '{print $2, $3, $4, $11}' | head -1 && ps axu | awk '{print $2, $3, $4, $11}' | sort -k3 -nr |head -5

$ cat /proc/meminfo
This will give memory usage information

$ ps auxwww|grep -i 'server' 
This should return all process which has server in them. Otherwise, server may have already stopped

No comments:

Post a Comment

Perfect order of ODI export and import

  Smart Export / Import is the recommended way to achieve such a migration. This is the easiest way to make sure all the dependencies are ta...