A console-based network load monitor on Debian and Ubuntu can be achieved using the vnstat
tool. vnstat
is a network traffic monitor that keeps a record of network traffic data and provides real-time statistics on the command line.
Here’s how to install and use vnstat
:
- Install
vnstat
:
sudo apt-get update
sudo apt-get install vnstat
- Configure
vnstat
to monitor the network interface you want:
sudo vnstat -u -i eth0
Replace eth0
with the name of your network interface.
- Check the real-time statistics:
vnstat
This will display real-time network traffic statistics for the specified network interface.
- To display the statistics for a specific time period, use the
-d
option:
vnstat -d
This will display daily statistics. You can also use -m
for monthly statistics and -h
for hourly statistics.
- To display a summary of the traffic data, use the
-s
option:
vnstat -s
vnstat
provides a simple and convenient way to monitor network traffic from the command line on Debian and Ubuntu systems.