User Tools

Site Tools


Dealing with monthly GB quotas

Most 3G and 4G/LTE contracts have a monthly quota of GBs you can upload/download. In many cases they will charge extra for any network activity after the monthly GB quota was used.

There are a few ways of controlling this on an OpenWrt router.

wrtbwmon tool

Github page

download instructions are not up-to-date, use wget -O wrtbwmon_0.36_all.ipk instead of the first, or wget –no-check-certificate -O - | tar xvz instead of the second

LuCi module for wrtbwmon

A custom script

The system keeps track of basic information already, if all you need is an overall consumption number, just point your script (or chronjob) to read these files. (change br-lan below with the name of your modem's interface if you want to look only at bandwith used for Internet, and not just for data exchange between your own devices in the LAN)

/sys/devices/virtual/net/br-lan/statistics/rx_bytes /sys/devices/virtual/net/br-lan/statistics/tx_bytes

docs/guide-user/network/wan/wwan/bandwith_caps_gb_quota.txt · Last modified: 2018/06/04 22:20 by tmomas