TechInfoDepot:DD-WRT/Bandwidth Monitor for DD-WRT

From TechInfoDepot
Jump to navigationJump to search

Bandwidth Monitor: General

The bw_monitor.sh file is a script which is run on a wrt firmware based router. The script is used to record and generate display information on a per MAC basis.

It is been completely re-written but is based on the wrtbwmon script created by Emanual Brucy (http://code.google.com/p/wrtbwmon/). The biggest difference from this script and the original (wrtbwmon) is the amount of data that is recorded and is able to be displayed, and its use of resources (I/O etc).

Because of the volume of data that is recorded and displayed, this version is a bit heavier on disk space and RAM (storing data for each day and generating/converting the data to a java script objects).

I am in the process of allowing users to turn off the daily usage, and purely record the total usage either periodically (reset day) or continually(as the current wrtbwmon does). THIS IS AVAILABLE IN VERSION 0.6 and above

It allows a router administrator to setup users to MAC's (1 to 1), or User Groups to a list of MAC's (1 to many).

The script starts of by setting up iptables rules (per IP), and recording download and upload data on a per-day basis (day 1 to day 31).

This data will be periodically saved to a usage file, which will be used to publish a java script file, which represents the data contained within the file (but converted into java script objects).

This java script output will then be used within an html file for displaying usage data in a friendly and effective manner to users (via a script link).

The script supports automatic usage reset and archiving (saving usage file and java script to a history), which can be triggered on any day of the month (at midnight).

The script is highly customizable and attempts to limit the amount of I/O by performing many functions within RAM.

Future Plans

Release History

Version 1.0

  • Added a new option to show MAC addresses in the html file if a client is Auto Added (showMAC - Option 17)
  • Provided very basic logging. This is enabled by supplying a log path and file name (logFilePath - Option 18)
  • General Code Cleanup

Version 0.9

  • Allows a user to change between 1000 and 1024 via Query String Parameters.
  • Ad