Prerequisites
Before monitoring disk I/O, make sure you have:
- SSH access to your VPS
- Root or sudo privileges (for some tools)
Method 1: Using iostat (System Statistics)
Connect to your VPS:
ssh hxroot@YOUR_SERVER_IP -p 22Install sysstat:
apt install sysstat -yRun iostat:
iostat -x 2Key columns to watch:
- %util – Percentage of time disk is busy (high = bottleneck)
- await – Average time for I/O requests (ms)
- r/s, w/s – Reads/writes per second
- rkB/s, wkB/s – Kilobytes read/written per second
Method 2: Using iotop (Per-Process I/O)
apt install iotop -ysudo iotopShows real-time I/O activity by process. Press q to quit.
Method 3: Using dstat (Combined View)
apt install dstat -ydstat -d -rShows disk reads/writes and I/O statistics.
Method 4: Using vmstat (I/O Wait)
vmstat 2 5Look at the wa column – high values indicate processes waiting for disk I/O.
Method 5: Using ioping (Latency Test)
apt install ioping -yioping -c 10 /varMeasures disk latency similar to ping.
Find Processes Causing High I/O
sudo iotop -b -n 1 | head -20Or using ps:
ps aux | awk '{if($8=="D") print}'Processes in "D" state (uninterruptible sleep) are often waiting for I/O.
Monitor I/O Over Time (Simple Script)
#!/bin/bash
while true; do
clear
echo "=== Disk I/O at $(date) ==="
iostat -x 1 1 | grep -A 1 "Device"
sleep 2
done✅ You can now monitor disk I/O on your Hostxpeed VPS.