Prerequisites
Before monitoring CPU usage, make sure you have:
- SSH access to your VPS
- Root or sudo privileges (for some commands)
Method 1: Using top (Real-time)
Connect to your VPS:
ssh hxroot@YOUR_SERVER_IP -p 22topPress 1 to see each CPU core individually.
Press P to sort by CPU usage.
Press q to quit.
Method 2: Using htop (User-friendly)
apt install htop -yhtophtop shows colored CPU bars and per-process usage.
Method 3: Using mpstat (Per-core Statistics)
apt install sysstat -ympstat -P ALL 1 3Shows CPU usage for each core every 1 second, 3 times.
Method 4: Using vmstat (System-wide)
vmstat 2Updates every 2 seconds. Columns: us (user), sy (system), id (idle), wa (I/O wait).
Method 5: Check CPU Info
lscpuShows CPU architecture, cores, threads, model.
nprocShows number of CPU cores available.
Method 6: Via Hostxpeed Portal
Your Hostxpeed client area shows live CPU usage:
- Log in to Hostxpeed Client Area
- Go to My Services → Your VPS
- Look for the CPU Usage card (e.g., 0.0% - 4 vCPU Cores)
Understanding CPU Usage
- us - User processes (normal applications)
- sy - System/kernel processes
- id - Idle (good - lower is busier)
- wa - Waiting for I/O (high may indicate disk bottleneck)
- st - Steal time (virtualization overhead – should be near 0)
Monitor CPU Over Time (Simple Script)
#!/bin/bash
while true; do
clear
echo "=== CPU Usage at $(date) ==="
mpstat -P ALL 1 1
sleep 5
done✅ You can now monitor CPU usage on your Hostxpeed VPS using multiple methods.