Coder Social home page Coder Social logo

dfberger / luci-wrtbwmon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kiougar/luci-wrtbwmon

0.0 3.0 0.0 94 KB

Bandwidth tracker for OpenWRT that uses wrtbwmon

Home Page: https://github.com/pyrovski/wrtbwmon

License: MIT License

Shell 37.54% Makefile 0.34% JavaScript 43.08% Lua 10.97% HTML 8.07%

luci-wrtbwmon's Introduction

Bandwidth tracker for OpenWRT

This Luci module uses wrtbwmon to track bandwidth usage.

Features
  • Auto refresh every 5 seconds (can be changed)
  • Track speed per client (if auto refresh is enabled)
  • No cron job required (wrtbwmon is updated on demand)
  • Ability to persist database across reboots and firmware updates

After installation you will see two new Usage and Usage Configuration menus items inside the Network menu list in the Luci GUI.

Network Usage

What it does

It displays a table that includes all columns wrtbwmon provides, with two additional ones (emphasis given):

  1. Client
  2. Download speed
  3. Upload speed
  4. Total downloaded
  5. Total uploaded
  6. Total usage
  7. First seen date
  8. Last seen date
How it works

The download/upload speed is calculated in memory on the front end using JS thus minimizing resource consumption on the router. To properly calculate these values an auto refresh interval must be set that runs the following commands on the router:

  • wrtbwmon update /tmp/usage.db
  • wrtbwmon publish /tmp/usage.db /tmp/usage.htm

For the above commands to work the only requirement is that the wrtbwmon package is installed and enabled.

Install

Step 1 - install the wrtbwmon package:
  • Download the latest .ipk file from wrtbwmon releases
  • Copy the file to your router /tmp directory
  • Install the package opkg install /tmp/wrtbwmon_*_all.ipk
Step 2 - setup* the wrtbwmon package:
  • Schedule it to run on startup /etc/init.d/wrtbwmon enable
  • Manually start it now /etc/init.d/wrtbwmon start

*If you have already setup a cron job to update the wrtbwmon database, it would be best if you removed it

Step 3 - install this module:
  • Download the latest .ipk file from releases
  • Copy the file to your router /tmp directory
  • Install the package opkg install /tmp/luci_wrtbwmon_*_all.ipk
  • Clear the cache for luci to get the web interface to refresh rm /tmp/luci-indexcache

TODO

  • Add the .ipk package to the OpenWRT feed

Contribute

Feel free to contribute on any of the above TODO items, or even on any feature you might think is helpful. I would appreciate any help.

Credits

A big thanks to

  • pyrovski for creating wrtbwmon and helping me with creating the .ipk package
  • OpenWRT organization for creating and maintaining openwrt and luci
  • Carl Worth [email protected] for his ipkg-build script that lies in this repo

luci-wrtbwmon's People

Contributors

kiougar avatar pyrovski avatar captn3m0 avatar fakuivan avatar

Watchers

James Cloos avatar Dan Berger avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.