August 05, 2026 · by CLIQHOST
An unmonitored server is a server waiting to cause you headaches. Whether you manage a VPS running a few WordPress sites or host critical applications on a dedicated server, monitoring your resources — CPU, RAM, disk, and network — is the foundation of serious server administration.
In this guide, you'll find the essential commands and tools every Linux administrator should know, with concrete, hands-on examples.
Common problems that can be caught early through monitoring:
Proactive monitoring gives you time to act before users notice any issues.
top CommandThe quickest way to see what's happening in real time:
top
Key columns to watch:
- %us — CPU time used by user processes
- %sy — CPU time used by the kernel
- load average — average load over 1, 5, and 15 minutes
If load average exceeds the number of CPU cores, that's a warning sign.
htop Command (Recommended)A more user-friendly visual alternative to top:
# Install on Debian/Ubuntu
apt install htop -y
# Install on CentOS/AlmaLinux
yum install htop -y
# Run
htop
Advantages: coloured progress bars, interactive sorting, ability to kill processes directly from the interface.
mpstat Command — Per-Core Statistics# Install
apt install sysstat -y
# Display stats every 2 seconds, 5 times
mpstat 2 5
Useful when you want to verify that all CPU cores are evenly loaded.
free Commandfree -h
Sample output:
total used free shared buff/cache available
Mem: 3.8G 1.2G 300M 150M 2.3G 2.1G
Swap: 1.0G 200M 800M
What to watch:
- available — memory actually free for new applications
- Swap used — if swap is consistently active, you need more RAM
vmstat Command# Display every 3 seconds
vmstat 3
The si (swap in) and so (swap out) columns show whether the system is actively swapping — a serious performance issue.
ps aux --sort=-%mem | head -10
Displays the top 10 processes sorted by memory usage in descending order.
df Command — Partition Usagedf -h
Example:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 50G 38G 12G 76% /
/dev/sdb1 100G 45G 55G 45% /var
Practical rule: When Use% exceeds 85%, it's time to act — clean up logs, archive files, or expand the partition.
du Command — Directory Usage# Top 10 directories by size in /var
du -sh /var/* | sort -rh | head -10
Useful for tracking down directories consuming unexpected space — bloated logs, forgotten backups, accumulated cache.
# Remove systemd journal logs older than 7 days
journalctl --vacuum-time=7d
# Check current log size
journalctl --disk-usage
nload Command# Install
apt install nload -y
# Monitor eth0 interface
nload eth0
Displays incoming and outgoing traffic in real time with ASCII graphs.
ss Command — Active Connections# Active TCP connections
ss -tuln
# Connection summary
ss -s
An unusually high number of TIME_WAIT or CLOSE_WAIT connections may indicate an application issue or an attack.
iftop Command — Traffic Per Connectionapt install iftop -y
iftop -i eth0
Shows in real time which IP addresses are generating the most traffic — useful for detecting suspicious activity.
systemctl# General status
systemctl status
# Check a specific service
systemctl status nginx
systemctl status mysql
Edit the systemd service file to enable automatic restart:
systemctl edit nginx
Add:
[Service]
Restart=always
RestartSec=5
Now if Nginx crashes, it will automatically restart after 5 seconds.
Netdata is an open-source tool that provides a full web dashboard on port 19999:
bash <(curl -Ss https://my-netdata.io/kickstart.sh)
After installation, visit http://YOUR_SERVER_IP:19999 for detailed graphs covering CPU, RAM, disk, network, MySQL, Nginx, and much more.
monitapt install monit -y
Example /etc/monit/monitrc configuration for RAM alerts:
set mailserver smtp.gmail.com port 587
username "[email protected]" password "password"
using tlsv12
set alert [email protected]
check system $HOST
if memory usage > 90% for 3 cycles then alert
if cpu usage > 95% for 5 cycles then alert
if loadavg (1min) > 8 for 5 cycles then alert
apt install logwatch -y
# Test report
logwatch --output mail --mailto [email protected] --detail high
You'll receive a daily email summarising server activity — failed login attempts, service errors, SSH activity.
Save the following script as /usr/local/bin/server-check.sh:
#!/bin/bash
echo "====== SERVER STATUS: $(hostname) ======"
echo "Date: $(date)"
echo ""
echo "--- CPU Load ---"
uptime
echo ""
echo "--- Memory ---"
free -h
echo ""
echo "--- Disk ---"
df -h | grep -v tmpfs
echo ""
echo "--- Top 5 CPU Processes ---"
ps aux --sort=-%cpu | head -6
echo ""
echo "--- Active Connections ---"
ss -s | grep -E 'Total|TCP'
chmod +x /usr/local/bin/server-check.sh
server-check.sh
You can schedule this script to run daily via cron:
crontab -e
# Add:
0 8 * * * /usr/local/bin/server-check.sh | mail -s "Daily Server Report" [email protected]
Monitoring Linux server resources doesn't require expensive or complex tools. With core commands — top, free, df, ss — and a few additional utilities like Netdata or monit, you'll have a clear picture of your server's health at all times.
The key is consistency: regular checks, configured alerts, and fast reactions to anomalies.
Managing a VPS or dedicated server and looking for a reliable infrastructure? At CLIQHOST we offer SSD VPS with full root access, local technical support, and managed administration options — so you can focus on your projects, not your server.
Real reviews from customers who trust CLIQHOST for performance, reliability and expert technical support.
"We moved our online shop from a foreign host and the difference is night and day — pages load instantly and support replies in minutes, in Romanian."
"Migrated 12 client sites to CLIQHOST. Free migration, zero downtime, and the cPanel setup is exactly what my team needed. Highly recommend."
"Our NVMe VPS handles traffic spikes without a sweat. Full root, local datacenter, and billing in MDL — everything we wanted from a provider."