How to get top processes with highest memory usage

This command shows you which processes are eating all of your server memory.

Mark van Eijk 1 minute read Hosting

Run this command to show the top 10 processes that are using the most memory (RAM) on your server:

ps -eo cmd,%mem --sort=-%mem | head -n 11

For CPU rather than memory, see top processes by CPU. To check total available memory first, see how much RAM your server has, and consider adding swap space if it's tight.