Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install htop to Check Memory Use on Your Server

This guide shows you how to install a tool called htop. It lets you see how much memory your server uses. It works on a droplet or any Linux VPS.

VPS and Cloud Servers2 min read8 steps

What is a droplet, and what is htop?

A droplet is the name some cloud providers give to a small virtual server. It is the same idea as a VPS. This guide works on any Linux server.

RAM is the short-term memory of a server. When RAM is full, the server becomes slow. htop is a free program that shows RAM, the processor and every running program in colour, live on your screen.

You need root access or sudo rights for the install.

Install htop

  1. Log in to your server over SSH.
  2. If you use Ubuntu or Debian, run:
    sudo apt update
    sudo apt install htop -y
    The first line refreshes the software list. The second installs htop.
  3. If you use AlmaLinux, Rocky Linux or CentOS, run:
    sudo dnf install epel-release -y
    sudo dnf install htop -y
    EPEL is an extra software store. On older CentOS 7 use yum in place of dnf.
  4. Start the program:
    htop

How to read the screen

  • Mem bar at the top shows used RAM against total RAM.
  • Swp bar shows swap. Swap is disk space the server uses when RAM runs out. It is much slower.
  • The numbered bars show the load on each CPU core.
  • The list below shows each running program. The MEM% column tells you how much memory each one uses.

Useful keys

  1. Press F6 and choose PERCENT_MEM to sort by memory use.
  2. Press F4 to search the list by name.
  3. Press F9 to stop a program. Be careful, as stopping the wrong one can break your site.
  4. Press q to leave htop.
Tip: If you only want a quick number, run free -m. It prints memory in megabytes without installing anything.

What to do if memory is full

  • Find the program using the most RAM and check if it is needed.
  • Restart a stuck service.
  • Think about upgrading your plan if the problem is regular. Ask Hostvento support for options.

Quick recap

  • htop shows live memory and CPU use.
  • Install it with apt or dnf, then type htop.
  • Read the Mem bar and the MEM% column.
  • Press q to quit.