How to monitor VPS resources with htop and Netdata
Knowing what is happening on your server is the first step to keeping it healthy. Two tools cover this well: htop for quick terminal checks, and Netdata for real-time dashboards in your browser.
htop is what you use when you SSH in and want to see what is eating your CPU. Netdata is what you leave running in the background and check from your phone or laptop.
Part 1: htop (quick terminal monitoring)
htop is an improved version of the classic top command. It shows processes, CPU usage, memory, and more in a color-coded layout.
Install htop
sudo apt update
sudo apt install htop -yRun it
htopYou will see a screen divided into sections:
CPU usage per core (colored bars at the top)
Memory and swap usage
A list of running processes
What each color means in htop
The CPU bars show different usage types:
Green - normal user processes
Blue - low-priority processes
Red - kernel processes
Keyboard shortcuts
Once htop is running, these are the most useful keys:
F6
Sort processes (by CPU, memory, etc.)
F9
Kill a selected process
F10
Quit htop
Arrow keys
Navigate the process list
Space
Highlight a specific process
u
Show processes for a specific user
t
Tree view (see parent-child relationships)
Understanding the output
If CPU is at 100%, something is working hard. If memory is nearly full, you might be running out of RAM. If the load average (top left) is higher than the number of CPU cores, your server is struggling.
htop does not save history. It shows you the current moment. For trends over time, use Netdata.
Part 2: Netdata (real-time monitoring dashboard)
Netdata is a monitoring tool that gives you a web dashboard with live metrics. CPU, RAM, disk, network, running services - it tracks everything and updates every second.
Install Netdata
The easiest way is the automatic installer:
This detects your OS, installs dependencies, and sets up Netdata as a systemd service. Give it a minute to finish.
Verify it is running
You should see "active (running)".
Access the dashboard
By default, Netdata listens on port 19999. If UFW is active, allow the port:
Now open your browser and go to:
You will see a dashboard with dozens of charts showing every aspect of your server's performance.
What the dashboard shows
Scroll through the sections:
CPU - usage per core, interrupts, frequency
Memory - RAM, swap, available memory
Disk - read/write speeds, IO operations
Network - bandwidth per interface
Applications - which processes use the most resources
Each chart updates in real time. Hover over a chart to see exact values at a specific moment.
Securing the dashboard
Leaving port 19999 open to the internet is not ideal. You have two options:
Option A: Use a firewall rule to restrict access
Allow only your IP:
Option B: Use an SSH tunnel (more secure)
Do not open port 19999 at all. Instead, connect from your local machine:
Then open http://localhost:19999 in your browser. The traffic goes through the encrypted SSH connection.
Netdata configuration file
If you want to tweak settings:
Common changes include disabling certain collectors or changing data retention periods. Most people never need to touch this.
Part 3: Bonus - disk usage check
While htop and Netdata handle most things, disk space is worth checking separately:
This shows mounted filesystems and how full they are. For a breakdown of what is using the space:
When to use each tool
Server feels slow right now
htop
Need to check last week's CPU spike
Netdata history
Debugging a specific process
htop (tree view)
General health check from phone
Netdata dashboard
Quick SSH check before deploying
htop
Long-term monitoring
Netdata
Conclusion
htop and Netdata complement each other well. Use htop for quick checks when you are already in the terminal. Keep Netdata running for continuous monitoring and historical data. Together, they give you full visibility into what your VPS is doing at any moment.
Last updated