Prerequisites
Before monitoring RAM usage, make sure you have:
- SSH access to your VPS
Method 1: Using free (Quick Overview)
Connect to your VPS:
ssh hxroot@YOUR_SERVER_IP -p 22free -hExample output:
total used free shared buff/cache available
Mem: 7.8G 2.5G 4.2G 123M 1.1G 4.8G
Swap: 2.0G 0.0G 2.0GImportant: Look at the "available" column – this is memory available for new applications. Linux uses free RAM for caching (buff/cache), which is normal.
Method 2: Using top/htop
topPress M to sort by memory usage.
htopMemory is shown as a colored bar at the top.
Method 3: Using vmstat
vmstat -sShows detailed memory statistics including total, used, free, cache, swap.
Method 4: Find Top Memory-Consuming Processes
ps aux --sort=-%mem | head -10Shows top 10 processes by memory usage.
Method 5: Using smem (Better Memory Reporting)
apt install smem -ysmem -r -kShows USS (unique set size) – more accurate than RSS.
Method 6: Via Hostxpeed Portal
Your Hostxpeed client area shows live RAM usage:
- Log in to Hostxpeed Client Area
- Go to My Services → Your VPS
- Look for the RAM Usage card (e.g., 32.7% - 2.5 GB / 8 GB)
Understanding Memory Types
- total - Total physical RAM
- used - Currently used (includes cached)
- free - Completely unused RAM (usually low)
- available - Memory available for new processes (most important)
- buff/cache - Disk cache (can be freed if needed)
- swap - Virtual memory on disk (slow, high usage indicates RAM shortage)
Monitor RAM Over Time
watch -n 5 free -h✅ You can now monitor RAM usage on your Hostxpeed VPS.