Monitor your bandwidth usage with vnstat [Ubuntu/Linux]

vnstat is a simple command line utility for monitoring bandwidth usage in Ubuntu or any other Linux based distributions and BSD. It’s a very handy tool for keeping an eye on overall bandwidth usage on your system, especially if you’re accessing web over mobile network or you’re using ISP that reduces speed after a certain limit e.g 50 GB (FUP).

vnstat

Features

  • very lightweight and efficient (low cpu usage regardless of traffic)
  • simple and easy to use (no configuration required)
  • it can monitor multiple interfaces simultaneously
  • multiple output options (daily, monthly etc)

Installing vnstat in Ubuntu/Linux

It’s already there in official package repository, all you need to do is open a terminal and type :

sudo apt-get install vnstat

As you install vnstat, it will start monitoring your internet traffic (default interface : eth0). Simply type vnstat to get an overview of actual bandwidth usage and the estimated usage for next day or month. It will also display the interface(s) it’s monitoring.

vnstat

For all available options, type :

vnstat --help

Few commands you should know

  • vnstat -d : for daily stats
  • vnstat -w : for weekly stats
  • vnstat -m : for monthly stats
  • vnstat -l : for analyzing live traffic
  • vnstat -t : shows usage statistics for top 10 days

Leave a comment

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