Environment:
Linux-based VPS or Dedicated Server
Access Required: SSH root or sudo access
Step 1: Install iftop
If iftop is not already installed on your server, you can install it with the following command:
For RHEL-based systems (AlmaLinux, CentOS, CloudLinux):
yum install iftop -y
For Debian/Ubuntu-based systems:
apt install iftop -y
Step 2: Check Bandwidth Usage
Run the following command via SSH:
iftop -i eth0
Explanation:
iftop: Interactive tool to monitor incoming/outgoing traffic per connection-i eth0: Specifies the network interface (e.g.,eth0,ens18,eno1, etc.)
💡 You can run
ip aorip linkto list available interfaces ifeth0doesn’t exist.
Step 3: Interpret the Output
The iftop interface shows three columns of bandwidth usage:
- TX: Transmit (outgoing) data
- RX: Receive (incoming) data
- TOTAL: Combined total bandwidth usage
It updates in real time and sorts the connections by bandwidth.
Optional: Use Filters or Adjustments
- Press
tto toggle between TX/RX display. - Press
Tto show cumulative totals. - Press
Pto freeze/unfreeze the display. - Press
qto quit.
Tip
If your interface is different (e.g., ens18), modify the command accordingly:
iftop -i ens18
Note: iftop requires root privileges. Use sudo if needed:
sudo iftop -i eth0
