Using ps to find the top 10 consumers of CPU and memory

To display the top 10 consumers of memory:

ps -auxf | sort -nr -k 4 | head -10

To display the top 10 consumers of CPU:

ps -auxf | sort -nr -k 3 | head -10

Arrow