Help with monthly bandwidth usage

I have successfully installed and configured OpenWRT 23.05.3. My ISP has a monthly bandwidth limit. I installed Netlink Bandwidth Monitor on the router and it is collecting and properly displaying the download and upload figures in LuCI.

I have an MQTT broker running on a Raspberry Pi. Is there a way that my broker can capture the upload and download figures from the router? I would prefer to use a Python script on the broker to do this if possible.

This line in a Python script grabs the necessary information from a router running DD-WRT:

stdin,stdout,stderr = ssh_client.exec_command("nvram show | grep traff-" + month + "-"  + year)
output = stdout.readlines()

Any help or suggestions would be greatly appreciated.

Then I, very much, suggest you install an ad-blocker. One that drops/sinks DNS requests. And a browser that also blocks ads.
I don't know, exactly now much bandwidth add use but my guess is between 30-50%.
I use Pi-hole and Brave and I don't see ads, anywhere.

Someone else can address your question directly.

Thanks for the reply. I do intent to install and use Pi-Hole eventually but trying to convert over from DD-WRT one step at a time.

hi

try luci-app-statistics

Another option is vnstat2 if you have USB or other storage on the router so the stats persist long term without wearing out the flash backing the overlay file system. Has a nice display for various time intervals. Storage location isn't currently configurable using luci so need to edit the config file: /etc/vnstat.conf and set the Database Dir. Find it a nice long term all on router solution to tracking usage over time.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.