last 10 process in linux code example
Example 1: what process consuming RAM
ps -o pid,user,%mem,command ax | sort -b -k3 -r
Example 2: check the linux process top 10
# ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head
ps -o pid,user,%mem,command ax | sort -b -k3 -r
# ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%mem | head