how to check which process is taking more memory in linux code example
Example 1: what process consuming RAM
ps -o pid,user,%mem,command ax | sort -b -k3 -r
Example 2: how to check which process is using more memory in linux
ps aux --sort=-%mem | head