Skip to content

Processes - PS command

CPU - most process usage

Fast:

ps aux --sort=+%cpu

Clean:

ps -eo pid,user,comm,%cpu --sort=-%cpu | head

RAM

Fast:

ps aux --sort=+%mem

Clean:

ps -eo pid,user,comm,%mem --sort=-%mem | head

Child processes

Show Process tree:

ps -ejH

Kill

kill <PID_or_process_name>
kill -9 <PID_or_PNAME>      # -9 = force, this might not kill a child process