vnstat: monitor internet data usage

cool_penguin_smallIf you have a data transfer limit on your internet connection you might want to keep a tab on how much data you have consumed already. The ISP stores the information in its servers and might provide you an option to view it. If it’s not there, try vnstat, written exactly to solve this problem.

vnstat uses the kernel as the information source and does not sniff your traffic, which also makes it faster and light. It is a cmdline utility. Features:

  • quick and simple to install and get running
  • gathered statistics persists through system reboots
  • can monitor multiple interfaces at the same time
  • several output options
    > summary, hourly, daily, monthly, weekly, top 10 days
    > optional png image output (using libgd)
  • months can be configured to follow billing period
  • light, minimal resource usage
  • same low cpu usage regardless of traffic
  • can be used without root permissions
  • online color configuration editor

To install vnstat on Ubuntu:

$ sudo apt-get install vnstat

USAGE

  • Start vnstat
    $ sudo vnstat -u -i eth0
    $ sudo /etc/init.d/vnstat start
  • Check data transfer for an interface
    $ vnstat -i eth0
  • Check transfer by month
    $ vnstat -m
  • vnstat has many options to show the information:
    -h,  --hours          show hours
    -d,  --days           show days
    -m,  --months         show months
    -w,  --weeks          show weeks
    -t,  --top10          show top10
    -i,  --iface          select interface (default: eth0)

Webpage: vnstat

Similar software

Leave a Reply

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