Wednesday, December 17, 2014

How To Install VnStat To Monitor Network Traffic Using The Terminal On Ubuntu

vnStat is a command line-based network traffic monitoring tool available for Linux as well as BSD. 

vnstat keeps a log of network traffic for the selected interfaces and uses the network interface statistics provided by the kernel as information source.

 Effectively means that it is light on system resources as it doesn’t actually sniff any traffic. However, for the command to run properly, at least a 2.2 series kernel is required.

  • The statistics it gathers persists through system reboots
  • It can monitor multiple interfaces at any given time
  • It provides several output options: summary, hourly, daily, monthly, weekly, and top 10 days
  • Months can be configured to follow billing period
  • It provides an option to produce output as a png image
  • It is light on system resources
  • It can be used without root permissions

To install vnstat on Ubuntu just run the following command via your systems Terminal.

sudo apt-get install vnstat
Run the vnstat command without options vnstat will show
daily and monthly report

run vnstat

run vnstat -h

this will show Hourly, daily, weekly, monthly.
run vnstat -d
this will show the daily.
Run vnstat --oneline
this will show a one line output.
Vnstat is a handy tool for those looking to monitor network traffic via command line.

1 comment:

  1. I am new to linux world. You article helped me. Thanks.