Ubuntu install vnstat console network traffic monitor

VnStat is a console-based network traffic monitor that can be used to track network traffic on Linux systems. To install VnStat on Ubuntu 20.04 LTS, you can use the following steps:

  1. Update the package list by running the command:
sudo apt update
  1. Install VnStat by running the command:
sudo apt install vnstat
  1. Once the installation is complete, you can start the VnStat daemon by running the command:
sudo systemctl start vnstat
  1. To ensure that VnStat starts automatically on boot, you can enable it by running the command:
sudo systemctl enable vnstat
  1. To check the status of the VnStat daemon, you can run the command:
sudo systemctl status vnstat
  1. To create the database for VnStat to monitor traffic on an interface, you can use the command :
sudo vnstat -u -i <interface>

Replace <interface> with the name of the interface you want to monitor, you can find the interface name by running the command “ip addr show”

  1. Once the database is created, you can view the network traffic statistics by running the command:
vnstat
  1. You can also view the statistics for a specific interface by running the command:
vnstat -i <interface>
  1. To view the statistics for a specific time period, you can use the command:
vnstat -d | -m | -t | -w | -h

You can also use vnstati to create image output of vnStat data, it is a tool to create PNG images out of vnStat data.

It’s important to note that VnStat is a console-based tool, it doesn’t have a web interface like other network traffic monitoring tools. However, it is lightweight and easy to use, and it provides a quick and simple way to monitor network traffic on your Ubuntu system.

Leave a Comment