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 a
orip link
to list available interfaces ifeth0
doesn’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
t
to toggle between TX/RX display. - Press
T
to show cumulative totals. - Press
P
to freeze/unfreeze the display. - Press
q
to 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