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
Richard Stallman calls for the W3C to remain independent of vendor interests.
The new release supports nine architectures, 73 human languages, and zero non-Free components.
Fedora developers release the first alpha version of Fedora 19, known as Schrödinger’s Cat, for general testing. The final release is expected in July 2013.
ack is a grep-like, command-line tool that has been optimized for programmers to search large trees of source code.
New features in SUSE Studio 1.3 include enhanced cloud integration, VM platform support, and lifecycle management.
The Linux Foundation recently announced that the Xen Project is becoming a Linux Foundation Collaborative Project.
Open source version of LiveCode is now available for developing apps, games, and utilities for all major platforms.
OpenDaylight is an open source software-defined networking project committed to furthering adoption of SDN and accelerating innovation in a vendor-neutral and open environment.
The new Gnome release includes privacy and sharing settings, allowing more user control over access to personal information.
Mozilla is collaborating with Samsung on a new web browser engine called Servo.