vnStat Network Traffic Monitor
vnStat is a network traffic monitor. It is ideal for maintaining a log of bandwidth usage, this is particularly useful when you using a metered Internet connection.
Installing vnStat
Using Ubuntu, vnStat can be installed with the following terminal command:
sudo apt-get install vnstat
Set-up vnStat
Once installed, run the following terminal command to make the application's directories writeable:
sudo chmod o+x /usr/bin/vnstat && sudo chmod o+wx /var/lib/vnstat/
Finally, define the network interface you would like to log with the following command. The example below lists ppp0 which is my USB mobile broadband modem, you can change this to match your system's network interface. i.e. eth0, wlan0 etc.
vnstat -u -i ppp0
Using vnStat
Once the set-up is complete, reports/logs can viewed in a number of ways. The default "Daily" report can be viewed simply by entering the command:
vnstat
Details about other reports can be seen by entering the command:
vnstat --help
Example report
The following is an example of a vnStat daily report:
corenominal@kermit:~$ vnstat
Database updated: Thu Jan 1 16:15:01 2009
ppp0
received: 82.63 MB (93.2%)
transmitted: 6.54 MB (6.8%)
total: 89.16 MB
rx | tx | total
-----------------------+------------+-----------
today 82.63 MB | 6.54 MB | 89.16 MB
-----------------------+------------+-----------
estimated 120 MB | 8 MB | 128 MB
Add Your Comment
Use the form below to add your comment. Markdown syntax is available. Note, comments are moderated by me for spam filtering. Alternatively, feel free to contact me privately.