// server management

How to Monitor Linux Server Resources: A Practical Guide for Administrators

August 05, 2026 · by CLIQHOST

How to Monitor Linux Server Resources: A Practical Guide for Administrators

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.


Why Does Server Resource Monitoring Matter?

Common problems that can be caught early through monitoring:

  • CPU overload — a runaway process consuming 100% slows the entire server
  • RAM exhaustion — active swap usage dramatically degrades performance
  • Full disk — causes application errors, corrupted databases, and service crashes
  • Abnormal network traffic — may indicate a DDoS attack or a compromised script

Proactive monitoring gives you time to act before users notice any issues.


1. Monitoring CPU Usage

The top Command

The 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.

The 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.

The 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.


2. Monitoring RAM Usage

The free Command

free -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

The 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.

Finding High RAM Consumers

ps aux --sort=-%mem | head -10

Displays the top 10 processes sorted by memory usage in descending order.


3. Monitoring Disk Space

The df Command — Partition Usage

df -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.

The 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.

Cleaning Up Old Logs

# Remove systemd journal logs older than 7 days
journalctl --vacuum-time=7d

# Check current log size
journalctl --disk-usage

4. Monitoring Network Activity

The nload Command

# Install
apt install nload -y

# Monitor eth0 interface
nload eth0

Displays incoming and outgoing traffic in real time with ASCII graphs.

The 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.

The iftop Command — Traffic Per Connection

apt install iftop -y
iftop -i eth0

Shows in real time which IP addresses are generating the most traffic — useful for detecting suspicious activity.


5. Monitoring Processes and Services

Checking Active Services with systemctl

# General status
systemctl status

# Check a specific service
systemctl status nginx
systemctl status mysql

Auto-Restarting Crashed Services

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.


6. Advanced Monitoring Tools

Netdata — Real-Time Visual Monitoring

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.

Setting Up Email Alerts with monit

apt 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

Logwatch — Daily Email Reports

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.


7. A Quick Server Health Check Script

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]

Conclusion

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.

SHARE
// what clients say

What Our Clients Say

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."

AM
Andrei M.
eCommerce owner · Chișinău
★★★★★

"Migrated 12 client sites to CLIQHOST. Free migration, zero downtime, and the cPanel setup is exactly what my team needed. Highly recommend."

EV
Elena V.
Web agency · Bălți
★★★★★

"Our NVMe VPS handles traffic spikes without a sweat. Full root, local datacenter, and billing in MDL — everything we wanted from a provider."

DC
Dmitri C.
SaaS founder · Chișinău