Monitor Bandwidth Usage with vnStat
In these days of bandwidth caps and pay-per-kilobyte rates, keeping an eye on your bandwidth usage makes a lot of sense. While there is no lack of bandwidth monitoring utilities, vnStat stands out from the crowd thanks to its ability to store monitoring data in a database and resume monitoring automatically on reboot. This means that once installed and configured, vnStat quietly monitors a specified network interface and saves the collected data. You can then use vnStat's command parameters to view detailed reports of your bandwidth usage.
vnStat is available in the software repositories of many mainstream Linux distributions, so you can easily install it using your distro's package manager. On an Ubuntu-based system, vnStat can be installed using the sudo apt-get install vnstat command. Before you can start using the utility, you must specify the network interface you want vnStat to monitor. First, run the ifconfig command to view a list of all available network interfaces. You can then use the -u and -i parameters to create a database for the specified network interface, for example:
sudo vnstat -u -i wlan0
Once vnstat is configured, it needs some time to collect data. After that you can view the bandwidth usage statistics using the vnstat command. The utility sports a few rather useful parameters, too. The -d ( or --days) parameter displays the daily bandwidth usage, while the -w ( --weeks) and -m ( --months) parameters break down the statistics by week and month. You can view a full list of available parameters using either the vnstat --help or vnstat --longhelp command.
The packaged version of vnStat that is available in your distro's software repositories may not include vnStati -- a nifty utility which can turn dry text-only statistics into nice-looking graphs. In this case, if you want to analyze monitoring data visually, you have to compile vnStat from source. Fortunately, this is a rather straightforward procedure. First of all, make sure that you have all the tools necessary for building software from source. On Ubuntu, you can install them using the sudo apt-get install build-essential command. Next, install the libgd2-noxpm and libgd2-noxpm-dev libraries, using the sudo apt-get install libgd2-noxpm libgd2-noxpm-dev command. Download the latest .tar.gz version of vnStat from the project's Web site and unpack it. Switch to the resulting directory in the terminal and execute the make all command. Finally, run the sudo make install command to install the software. To generate a graph in the PNG format using VnStati, you have to specify at least three parameters: a graph type, a network interface, and the output file. For example, the command below produces a vnstat.png graphics file containing a traffic summary including hourly data using a horizontal layout:
vnstati -vs -i wlan0 -o ~/vnstat.png
Of course, you can use the vstati --help command to view a list of the available parameters.
Additional ToolsThis tool looks great, thanks.
If anyone has additional network monitoring needs, let me suggest this website: http://www.activitymonitori...network_server_monitoring1.php
great tipthank you very much, have been looking for such a program.
was easy to install through ubuntu's apt
I am trying to configure vnstat php fontend (http://www.sqweek.com/sqweek/index.php?p=1) must have for a server
Customers can take a free test drive of SLES for HPC on the Azure Cloud
San Francisco-based chip company announces their first fully open source chip platform.
The whole distro gets rebuilt on glibc 2.3
Ubuntu Vendor tries to solve app packaging and distribution problem across distributions.
Founder of ownCloud launches the Nextcloud project.
Will The Machine change the way future programmers think about memory?
The new Torus distributed storage system is available under an open source license on GitHub
Juries decides Google’s use of Java APIs Was Fair Use
But if you are not using the latest Linux kernel, your system is insecure.
Home routers will give room for custom firmware but still comply with FCC rules