BandwidthD renders great bandwidth usage reports and is a breeze to install.
Step 1 – Install bandwidthd to monitor bandwidth usage
You most likely won’t need to enter any custom configuration values during installation. Just make sure the interface to monitor is properly set, usually eth0.
sudo apt-get install bandwidthd
Step 2 – Set up reverse DNS
By following this step your machine’s hostname will be displayed in the reports. Without this step, only an IP address will be displayed. Add a line to /etc/hosts, consisting of your machine’s public IP address and its hostname.
127.0.0.1 localhost notblog
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
Step 3 – Create symbolic link to status report directory
Bandwidthd writes its reports to /var/lib/bandwidthd/htdocs/ by default. We can easily serve these reports from a website by creating a symbolic link.
ln -s /var/lib/bandwidthd/htdocs bwstats
In this example, reports would be served at http://notblog.org/bwstats/