How to Connect to Your VDS Server via SSH (Complete Guide)
Step-by-step SSH connection guide for Linux VDS: PuTTY, Terminal, key-based authentication, Path Panel firewall rules, and security best practices.
Complete guide to monitoring Linux VDS server resources: htop, free, df, iostat commands, network monitoring tools, and automated alert scripts.
Monitoring your server's resource usage is essential for maintaining optimal performance and identifying potential issues before they become critical. This guide covers the most important commands and tools for monitoring CPU, RAM, disk, and network usage on Linux servers.
The top command provides a real-time view of system processes:
top
Key metrics to watch:
Load average should ideally be below the number of CPU cores. For a 4-core server, a load average above 4.0 indicates the system is overloaded.
htop is an enhanced version of top with a more user-friendly interface:
# Install htop
sudo apt install htop -y # Debian/Ubuntu
sudo yum install htop -y # CentOS/RHEL
# Run htop
htop
htop features:
# Number of CPU cores
nproc
# Detailed CPU info
lscpu
# Per-core usage
mpstat -P ALL 1 5
free -h
Example output:
total used free shared buff/cache available
Mem: 7.8Gi 3.2Gi 1.1Gi 0.2Gi 3.5Gi 4.1Gi
Swap: 2.0Gi 0B 2.0Gi
| Column | Description |
|---|---|
| total | Total physical RAM |
| used | RAM in use |
| free | Completely unused RAM |
| buff/cache | RAM used for buffers and cache (reclaimable) |
| available | RAM available for new applications |
The "available" column is more important than "free". Linux uses free RAM for disk caching, which is automatically released when applications need it.
# Check swap usage
swapon --show
free -h | grep Swap
# Find processes using swap
for file in /proc/*/status; do
awk '/VmSwap|Name/{printf $2 " " $3}END{print ""}' $file 2>/dev/null
done | sort -k2 -rn | head -10
High swap usage indicates insufficient RAM. Swap is much slower than RAM since it uses disk storage.
# Disk usage summary
df -h
# Find largest directories
du -sh /* 2>/dev/null | sort -rh | head -10
# Find large files
find / -type f -size +100M -exec ls -lh {} \; 2>/dev/null | sort -k5 -rh | head -10
# Install iostat
sudo apt install sysstat -y
# Monitor disk I/O
iostat -x 1 5
# Process-level I/O
sudo iotop -o
If disk usage exceeds 90%, performance issues may occur. Above 95% is critical — free up space immediately.
# Network interface statistics
ifconfig eth0
# Connection summary
ss -s
# Active connections by IP
ss -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -rn | head -10
# Bandwidth monitoring (requires nload)
sudo apt install nload -y
nload eth0
#!/bin/bash
echo "=== CPU ==="
top -bn1 | head -5
echo ""
echo "=== RAM ==="
free -h
echo ""
echo "=== DISK ==="
df -h /
echo ""
echo "=== LOAD ==="
uptime
echo ""
echo "=== TOP PROCESSES ==="
ps aux --sort=-%cpu | head -5
Load average should be below the number of CPU cores. For a 4-core server, consistently above 4.0 indicates overload.
Linux uses free RAM for disk caching. Check the 'available' column in 'free -h' — this shows actual available memory.
Be cautious when disk usage exceeds 85%, and take immediate action above 90%. A completely full disk can cause server crashes. Use 'df -h' to check regularly.
Step-by-step SSH connection guide for Linux VDS: PuTTY, Terminal, key-based authentication, Path Panel firewall rules, and security best practices.
Complete guide to connecting to Windows Server VDS via Remote Desktop (RDP): setup steps, NLA security, Path Panel firewall rule, and troubleshooting tips.
Step-by-step guide to changing your VDS server OS via REXE panel: backup tips, supported Linux distributions and Windows Server versions explained.