Let's divide all the available bandwidth monitoring tools into two sections:
- Tools for current bandwidth usage
- Tools for historical bandwidth usage
Interactive bandwidth measurement and monitoring can be achieved with the two small tools: bmon and iftop. They require less system resources on your OpenWrt system.
bmon is available as a package for most platforms and has two interfaces: CLI and HTML.
The CLI interface: after being installed (Note: bmon requires some additional packages) you can run bmon just by typing it and on the console based user interface you can see all the network interfaces on your system. Pressing “g” shows a graph with the current bandwidth being used. Pressing “d” shows the details of it.
The HTML interface: you can also configure bmon not just to output in a terminal window but to render HTML. To do that you need to install the uhttp package and do a little bit of configuration. It is not too hard; here are the steps:
opkg install uhttpd bmon /etc/init.d/uhttpd start mkdir /tmp/bmon ln -s /tmp/bmon/ /www/ bmon -o html:path=/www/bmon/
Also an option to only run to HTML output so you can start on boot (Can add the following to rc.local)
bmon -o null -O html:path=/www/bmon/ 2>&1 >/dev/null &
there is no HTML output module Chaos Calmer (bmon -o list)
For Chaos Calmer you can use the ncurses output module:
bmon -o curses
As well as bmon, the package iftop is available for most OpenWrt platforms and allows a deeper insight into the data being transferred and the active connections. You can run iftop for your bridged LAN interface by typing in the following:
opkg install iftop iftop -i br-lan
iftop will then show you the connections being established, the data being transferred as well as the bandwidth.
These tools are more feature-rich applications; moreover many of them can collect statistics from multiple sources (eg. CPU, RAM, disk, etc).
Some of them can consume a lot of system resources on your OpenWrt router system.
Approximate order from most-basic to most-feature-rich:
wrtbwmon < vnstat < YAMon < luci_app_statistics < bandwidthd < ntop
Please, help ordering each, thanks.
|bmon||a portable bandwidth monitor and rate estimator||yes|
|iftop||iftop does for network usage what top(1) does for CPU usage. iftop shows table of highest bandwidth usage paired on IP source and destination pairs.||yes|
|vnstat||a console-based network traffic monitor||yes|
|luci-app-vnstat||LuCI interface for vnstat||yes|
|collectd||a daemon which collects different statistics||yes|
|luci_app_statistics||collectd and rrd-tool based general statistics tool||yes|
|ntop||a network traffic probe that shows the network usage||no|
|pmacct||IP usage accounting suite||no|
|fprobe||Forward aggregated traffic data as NetFlows to tools like ntop or pmacct||no|
|darkstat||Captures network traffic, calculates statistics about usage, and serves reports over HTTP||yes|
|MRTG||Tobi Oetiker's MRTG - The Multi Router Traffic Grapher||no|
|bwm-ng||small and simple console-based live network and disk io bandwidth monitor||yes|
|IPTraf||IPTraf is a console-based network statistics utility for Linux||no|
|bandwidthd||builds HTML files with graphs and charts are built by individual IPs||yes|
|wrtbwmon||Per-user bandwidth monitoring tool for Linux-based routers||no|
|nlbwmon||LEDE Traffic Usage Monitor; tracks amount of data sent/received per device, per month||yes|
|YAMon||Per-user bandwidth monitoring (and more) with detailed, extensive graphical reporting capabilities||no|
|CloudShark||capture filtered traffic, then upload to cloud for analyze||yes|
There is a collection of Bandwidth Monitoring Tools For Linux from 2007: link Along with the previous open-source bandwidth monitoring tools, there is an array of free commercial tools that can assist you with the monitoring of your bandwidth - found here.
With higher bandwidths being provided by internet service providers it becomes harder both for the end-user and the service provider to provide these bandwidths. That is also the reason why many websites that offer bandwidth measurement have become quite popular (such as www.speed.io). Some internet providers even provide their own speed tests for their customers.
Just because you have a 50 Mbit/s internet line (such as with EuroDOCSIS 3.0 or VDSL) does not necessarily mean that each download you do with your internet browser works at 6 Mbytes/s. There are several factors that affect your download and/or upload speed.
The following factors affect your bandwidth and thereby your download/upload speed:
To measure your maximum bandwidth now, you should start a terminal with iftop and bmon. Next up you should shut down or disconnect all clients except the machine you're connected to the router with.
Now you can start some online speed tests (such as www.speed.io) and check the real bandwidth that is been used by these services. Afterwards you should find at least 3 to 4 fast internet services in your area. You should then open up an additional terminal and start 3 downloads with wget on your OpenWrt router in parallel. Note: you should always tell wget to store large files in “/dev/null”, because otherwise it might brick your router by writing into the RAM until it's full.
wget http://speedtest.netcologne.de/test_1gb.bin -O /dev/null && wget http://speedtest.qsc.de/1GB.qsc -O /dev/null && wget ftp://ftp.halifax.rwth-aachen.de/opensuse/distribution/11.3/iso/openSUSE-11.3-DVD-i586.iso -O /dev/null
The best test servers are mostly those from which you normally download. So try to find a fast university server for example that mirrors Unix/Linux distributions and try to download from these servers. Also some ISPs provide test files or downloads. If your ISP provides big downloadable files you should also use them to test your bandwidth, because your ISP should be the one that can provide you the best download speed as there is no other provider in between.
If you tested your maximum bandwidth and it is either not reaching the maximum contracted with your ISP or only sometimes reaches the maximum there is a short checklist that you should walk through and check.
Sometimes end-user service contracts with ISP state the bandwidth as “up to” which means that they can provide you the maximum bandwidth, but they cannot guarantee that it is available. This is often the case with some ADSL or VDSL providers Germany.
You should make sure that when you do have a 50 Mbit/s line that your LAN has at least 100 Mbit/s. A Gigabit LAN would be recommend for bandwidths greater than 40 Mbit/s, because otherwise your LAN bandwidth might be consumed by local file transfers or other LAN services being used by other clients connected to your router. Try not to make internet bandwidth tests from your wireless network and instead test your wireless network separately by transferring data from cable-connected clients (Ethernet or Fibre) to wireless clients.
Running iftop helps you find all traffic that is currently active in your local network. So if another client transfers gigabytes of data within your local network this can also dramatically slow down your internet transfers. Make sure the only connection that is available in your LAN while testing is the test download traffic. Especially services such as SMB (Samba/Windows Workgroups or Domains) produce lots of overhead and unwanted network traffic. Try to find that unwanted network traffic and eliminate the services on the clients that consume the bandwidth.
Just make sure that your router has sufficient RAM free and the CPU is not fully used while transferring big amounts of data. Usually this is not a problem, but installing too much software and using your router for other services (which is for some people common with OpenWrt) it can slow down the network management of your router. Also make sure that when you have an internet line that has a bandwidth greater than 70 Mbit/s it is highly recommended to use Gigabit Ethernet.
Due to some press reports about ISP not providing the proper bandwidth, many people in the first place start to blame the ISP when their bandwidth is not as expected. In fact most ISPs do all they can to provide the proper bandwidth; blaming them for not trying to do so is often wrong. If you did check all points above and direct downloads from the website or a website directly located in the network of your ISP are still not at the speed expected and that happens around the clock (24hrs/day) you should call your ISP to do bandwidth measurement on his side.