Knowledge

How to get top processes with highest memory usage

#Hosting

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

Published by Mark van Eijk on August 12, 2022 · 1 minute read

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.

Subscribe to our newsletter

Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!