Monitoring Bandwidth with VNstat

VNstat is a bandwidth monitoring tool that will let you monitor your bandwidth and provide daily, weekly and monthly tracking metrics. 

To install and setup Vnstat, you will need to follow the steps in this article.

  1. Log into your linux server and type the following command.wget http://humdi.net/vnstat/vnstat-1.10.tar.gz
  2. Next to uncompress the file you will need to run the following command.tar -zxvf vnstat-1.10.tar.gz
  3. Now that you have the file uncompressed, you will need to install Vnstat. To do this, you will need to navigate to the VNstat directory and run the following command.make & make install
  4. Now that it has been installed, you will first need to run "vnstat --iflist" on your server, so you know the name of your network adaptors.vnstat --iflist
  5. You will now be presented with the any available adaptors on your server.Available interfaces lo eth0 sit0
  6. Now that you know what adaptors you have on your server, you will need to tell VNstat to create a small database for that adapator. To do this, simply type/usr/bin/vnstat -u -ithen the adaptor name. So for our example, we would run the following /usr/bin/vnstat -u -i eth0 If you have multiple adaptors, you will need to do this for each adaptor. However you do not have to if you only want to monitor specific adaptors.
  7. Next, make sure that Vnstat restarts whenever you reboot your server. To do this, add the service to your server's "Chkconfig" list by running the following command.chkconfig --add vnstat
    chkconfig vnstat on
  8. Now you can access Vnstat by logging into the server at anytime and typing "vnstat". Doing so will give you a realtime status of your bandwidth.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Installing htop

htop is an interactive process viewer for Linux, which is a powerful alternative to the...

Bind Multiple IP Addresses to a Single Network Interface Card (NIC)

This tutorial demonstrates how to bind multiple IP addresses to a single NICI'll be using LAN...

Clear Memory Cache on Linux Server

By default the Linux OS has a very efficient memory management process that should be freeing any...

Set the time on a Linux server

Log into the server via SSHAt the shell prompt run the following command:date MMDDHHmmYYYYFor...

Check your disk usage in Linux

A good way to check your disk usage for folders on your Linux server is via shell.Download...