Modified from https://code.google.com/p/wrtbwmon/.
- "First seen" and "Total" columns in usage table
- Monitoring of locally generated traffic on a per-interface basis
remove
function to deleteiptables
rules
wrtbwmon
was designed to track bandwidth consumption on home routers.
It accomplishes this with iptables
rules, which means you don't need to run an extra process just to track bandwidth.
wrtbwmon
conveniently tracks bandwidth consumption on a per-IP address basis,
so you can easily determine which user/device is the culprit.
- Install:
make install
- Setup:
wrtbwmon.sh setup
- Update table:
wrtbwmon.sh update /tmp/usage.db
(you can place the data table anywhere) - Create html page:
wrtbwmon.sh publish /tmp/usage.db /tmp/usage.htm
-
Install the wrtbwmon.sh script somewhere, making sure to update
baseDir
anddataDir
to point toreadDB.awk
andusage.htm*
, respectively. -
Add the following to root's crontab, assuming
<script location>
is replaced with the actual location:* * * * * <script location> update /tmp/usage.db 0 * * * * <script location> publish /tmp/usage.db /tmp/usage.htm
wrtbwmon.sh remove