Enterprise hosting · Built for gamers
How Do I Monitor My Server?
Server monitoring helps you detect problems before they become critical. This guide shows you various methods – from simple console commands to professional monitoring tools. This way you always keep an eye on CPU, RAM, disk space and network.
Note: Detailed subpages on individual tools can be found in the left navigation.
Why monitoring is important
- Detect problems early before users complain
- Identify bottlenecks and upgrade selectively
- Track down crashes and their causes
- Recognize long-term trends (e.g. increasing load due to more visitors)
1. Real-time monitoring via console
htop – Interactive process monitor
htop
htop displays CPU, RAM and swap in colored bars. You can sort, filter and kill processes at the press of a key. The most important indicators:
- CPU bars at the top: One bar per core. Full load on one core = single-thread problem
- RAM bar: Green = used, Blue = buffers, Yellow = cache. Only when green is full does it become tight
- Load Average: Three numbers (1, 5, 15 minutes). Higher than core count = overload
- Swap: Visible in the upper area. Constant swap usage = RAM problem
Glances – Everything at a glance
# Installation
apt install glances # Debian/Ubuntu
pip install glances # Alternatively via pip
# Start
glances
Glances combines CPU, RAM, I/O, network and disks in a single view. Less interactive than htop, but clearer for a quick overview. With glances -w you start a web server on port 61208 for browser access.
2. Monitoring disk space
df – Check partitions
df -h
Shows all partitions with size, used and available space. Watch for values above 90% – then it becomes critical.
ncdu – Interactive disk space analyzer
apt install ncdu
ncdu /
ncdu shows folder sizes in a navigable tree view. Perfect for finding space hogs. Navigate with arrow keys, delete with d.
Automatic alert via script
#!/bin/bash
# Disk space alert via email
THRESHOLD=90
df -h | awk '{if (NR!=1) {print $5 " " $6}}' | while read output; do
usep=$(echo $output | awk '{print $1}' | cut -d'%' -f1)
partition=$(echo $output | awk '{print $2}')
if [ $usep -ge $THRESHOLD ]; then
echo "Warning: Partition $partition is $usep% full" | mail -s "Disk Space Warning" [email protected]
fi
done
Set up as a daily cronjob:
0 8 * * * /path/to/script.sh
3. Network monitoring
iftop – Real-time bandwidth usage
apt install iftop
iftop -i eth0
Shows which connections are using how much bandwidth. Sender on the left, receiver on the right. Useful to see if a single client is flooding the server or a backup is blocking the line.
nload – Simple bandwidth monitor
apt install nload
nload eth0
Shows incoming and outgoing traffic as graphs with average and peak values. Fewer details than iftop, but easier to interpret.
vnstat – Traffic statistics over time
apt install vnstat
vnstat -d # Daily statistics
vnstat -m # Monthly statistics
vnstat -h # Hourly statistics
vnstat runs as a daemon and records traffic data continuously. Ideal for long-term analysis – unlike iftop, which only shows the current moment.
4. Long-term monitoring and notifications
Netdata – Professional monitoring with web interface
# Installation (one command)
bash <(curl -Ss https://my-netdata.io/kickstart.sh)
After installation, access Netdata at http://your-server-ip:19999. It offers:
- Hundreds of detailed graphs for CPU, RAM, I/O, network, disks
- Automatic alerting when thresholds are exceeded
- Data from the last hours and days in historical view
- Very low resource consumption (approx. 1% CPU, 30 MB RAM)
- Only accessible locally by default – use an Nginx reverse proxy for external access
Prometheus + Grafana – Enterprise monitoring
For larger setups with multiple servers:
- Prometheus: Collects metrics from all your servers
- Node Exporter: Provides server metrics for Prometheus
- Grafana: Creates clear dashboards from Prometheus data
Simple service monitoring with Uptime Kuma
# Install via Docker
docker run -d --name uptime-kuma -p 3001:3001 -v uptime-kuma:/app/data louislam/uptime-kuma
Uptime Kuma monitors whether your services are reachable. It checks HTTP(s), TCP ports, pings and more. When failures occur, it notifies you via email, Discord, Telegram or many other channels. Perfect to know immediately when your website or game server goes offline.
5. Log monitoring
journalctl – Search systemd logs
# Last 50 lines of all logs
journalctl -n 50
# Logs of a specific service
journalctl -u nginx
# Logs since today
journalctl --since today
# Logs with errors
journalctl -p 3 -xb
tail – Follow logs in real time
# Watch Apache/Nginx access log live
tail -f /var/log/nginx/access.log
# Show only errors
tail -f /var/log/nginx/error.log
Logwatch – Daily summary via email
apt install logwatch
logwatch --detail High --mailto [email protected] --service All --range Today
Logwatch summarizes all important log events daily and sends them to you via email. You can see at a glance what happened on your server.
6. Which tool for which purpose?
| Purpose | Tool | Effort |
|---|---|---|
| Quick check via SSH | htop, df, iftop | None (already installed) |
| Nice web interface | Netdata | One command |
| Service availability | Uptime Kuma | Docker container |
| Multiple servers | Prometheus + Grafana | Higher, multiple components |
| Traffic statistics | vnstat | One command |
| Log analysis | journalctl, tail, Logwatch | None to low |
7. Recommended basic setup
This combination covers most use cases:
- htop + df + iftop: For quick SSH checks
- Netdata: For detailed long-term overview via browser
- Uptime Kuma: For notifications of outages
- Logwatch: For daily summary via email
Detailed installation guides for each tool can be found in the articles in the left navigation.
NexoraHost
Root & VPS servers
Ryzen power at Maincubes FRA01 – full root access, NVMe, DDoS protection included.
nexorahost.com · Maincubes FRA01 · 1 Tbit/s DDoS · 99,9 % Uptime