Monday, January 3, 2022

CPU Memory Utilization Commands Ubuntu


CPU Commands in Linux:

top  ==> Press c
top  ==> Press shift+m

Show Processes in Descending order of Memory in Linux:
ps aux | head -1; ps aux | sort -rnk 4 | head

ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%cpu | head



Show Processes in Descending order of CPU in Linux:
ps aux | head -1; ps aux | sort -rnk 3 | head

ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%mem | head