Install network traffic monitoring utility vnStat on Ubuntu server

vnStat is a console based network traffic monitoring utility for Linux which collects bandwidth statistic for selected interface(s).
Network traffic monitoring utility vnStat

To install vnStat run:
sudo apt-get install vnstat

To create and configure database run:
sudo vnstat -u -i eth0
Note 1: This assumes that you want to monitor eth0 interface. To find all your active interfaces run ifconfig.
Note 2: Some manuals state that above command should create a cron job. This was the case with older vnStat 1.6 version. Current vnStat 1.10 version uses daemon therefore cron job is not created. To check your vnStat version run: sudo vnstat -v

To start monitoring daemon run:
sudo service vnstat start

To display collected statistics run:
vnstat -q
Note: it may take couple of minutes after starting the service for vnStat to display statistics.

To display transfer rates in real time run:
vnstat -l

To view all options run
vnstat -?

Ubuntu server 10.10


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *