To view the bandwidth usage on a Linux or UNIX server, you can use the iftop
command.
iftop
This will display a live update of the network traffic on the server, showing the bandwidth usage by each network connection.
To display the bandwidth usage in a specific interface, use the -i
option followed by the name of the interface.
For example, to display the bandwidth usage on the eth0
interface:
iftop -i eth0
To display the bandwidth usage in a specific network, use the -f
option followed by a filter expression.
For example, to display the bandwidth usage for the 192.168.1.0/24
network:
iftop -f 'net 192.168.1.0/24'
You can also use the vnstat
command to view the bandwidth usage on a Linux or UNIX server. The vnstat
command keeps track of network traffic over time, and can display the bandwidth usage for a specific time period.
To display the bandwidth usage for the current month, use the vnstat
command with the -m
option:
vnstat -m
To display the bandwidth usage for a specific interface, use the -i
option followed by the name of the interface.
For example, to display the bandwidth usage on the eth0
interface:
vnstat -i eth0