Network Traffic Counters Like vnstat And ntop


Install the command line program vnstat, a network traffic counter, on Ubuntu:

sudo aptitude install vnstat

Set up vnstat for your (e.g. dial-up: ppp0) internet connection:

sudo vnstat -u -i ppp0

View traffic:


Set up a PHP based vnstat frontend


cd ~/Downloads
git clone git://
sudo cp -R vnstat-php-frontend /var/www/vnstat

change the configuration file config.php

  • language: en
  • interfaces...
  • vnstat binary...

If something has changed, update like this (you have to do the setup again):

cd ~/Downloads/vnstat-php-frontend
git pull origin master
sudo rm -rf /var/www/vnstat
sudo cp -R ./ /var/www/vnstat


ntop is a network monitoring tool with extensive log transfer depending on adapter, destination, type of traffic etc. Includes a web server.

Set up according to:


sudo apt-get install ntop
# set the admin password:
sudo ntop -A
# change settings (like nic to monitor):
sudo dpkg-reconfigure ntop
# restart ntop with new settings:
sudo /etc/init.d/ntop restart

Then goto http://localhost:3000/ to access the stats.


  • gkrellm: GUI that logs traffic for days, week & months.
  • KNemo Traffic monitor on KDE.