Giter Site home page Giter Site logo

kiougar / luci-wrtbwmon Goto Github PK

View Code? Open in Web Editor NEW
312.0 312.0 56.0 129 KB

Bandwidth tracker for OpenWRT that uses wrtbwmon

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

License: MIT License

Makefile 0.20% Lua 10.01% HTML 6.58% Shell 22.57% JavaScript 60.63%
bandwidth-monitor luci network-monitoring openwrt router wrtbwmon

luci-wrtbwmon's People

Contributors

captn3m0 avatar dfberger avatar fakuivan avatar kiougar avatar mas15 avatar nyarumi avatar pcartwright81 avatar pyrovski avatar xiersa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

luci-wrtbwmon's Issues

Can't define wrtbwmon [user_file]

Hello, I've tried (and failed) to add an option to define a user file to replace MACs with nicknames, as the wrtbwmon program allows for.

tried by adding this to model/cbi/wrtbwmon.lua
local macfile = s:option(Value, "macfile", translate("Nickname by MAC file"))

But that's as far as I got, I don't know much about Luci and I have no experience with Lua.

This would be super useful, because these dang Android devices don't allow you to set your own hostnames!

Cheers

Negative download/upload speeds on devices hopping between vlans

I've setup a guest network using VLANs (based on this guide) that has down/up limits that prevents it from saturating the whole internet link. Sometimes if one of my devices is saturating the link I preffer to move it to the gest network so I can still use the internet on the internal network.
All of these devices have their hostname and local IP set on the DHCP section.

For some reason, these devices show negative values on the speed meter:
negative speeds
And speed values fluctuate even though the first one is connected to the internal VLAN and the other two are turned off.

Versions:

root@router:~# opkg list-installed | grep wrtb
luci-wrtbwmon - 0.3.1
wrtbwmon - 0.36```

Malformed package file

$ opkg install luci-wrtbwmon_0.6.0_all.ipk
Collected errors:
 * pkg_init_from_file: Malformed package file luci-wrtbwmon_0.6.0_all.ipk.

LUCI menu entry missing

Installed on OpenWRT x86 in a VM. It's a custom distro called OpenMPTCProuter. I followed the instructions exactly, including rm /tmp/luci-indexcache with no errors. Refreshed the page and tried multiple browsers. No "usage" entry in the Network menu.

Handling accidental shutdowns

I haven't setup a cron yet (as recommended), but I was wondering if the router goes down accidentally (say, on power loss) and I haven't checked the web-interface in a while, then the update/publish cycle won't get called.

Which means that the graphs would be inaccurate on the next reboot.

I think the wrtbmon code already has a lockfile, so running update/publish on a cron shouldn't have any adverse affects either.

help me

ssh输入代码 opkg install luci luci-base luci-compat
登录界面无法登录并显示如下代码
/usr/lib/lua/luci/controller/ddns.lua:14: module 'luci.model.ipkg' not found:
no field package.preload['luci.model.ipkg']
no file './luci/model/ipkg.lua'
no file '/usr/share/lua/luci/model/ipkg.lua'
no file '/usr/share/lua/luci/model/ipkg/init.lua'
no file '/usr/lib/lua/luci/model/ipkg.lua'
no file '/usr/lib/lua/luci/model/ipkg/init.lua'
no file './luci/model/ipkg.so'
no file '/usr/lib/lua/luci/model/ipkg.so'
no file '/usr/lib/lua/loadall.so'
no file './luci.so'
no file '/usr/lib/lua/luci.so'
no file '/usr/lib/lua/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/lib/lua/luci/controller/ddns.lua:14: in main chunk
[C]: in function 'require'
/usr/lib/lua/luci/dispatcher.lua:531: in function 'createindex'
/usr/lib/lua/luci/dispatcher.lua:558: in function 'createtree'
/usr/lib/lua/luci/dispatcher.lua:243: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:121: in function </usr/lib/lua/luci/dispatcher.lua:120>

IP address change not detected until update

It seems that an IP address change is not detected automatically until one checks the 'Usage' page forcing an update. This way the accounting for that device will be missing between the IP change and the 'Usage' check.
Is there a way around this besides using fixed IP addresses ?
Can the database be updated automatically even when the 'Usage' page is not opened ?

add traffic running from router to list

hello,

I run transmission directly from my router (on 192.168.1.1) as well as an OpenVPN server. Is there any way to track the traffic from transmission and openvpn off the host? thank you!

Also, is there a forum post on openwrt.org about this mod? It's a great mod but I don't see it anywhere.

Always saying "Form token mismatch" when submit custom user file

When I hit submit custom user file, whatever the text field is blank or not, the page always saying

Form token mismatch
The submitted security token is invalid or already expired!
In order to prevent unauthorized access to the system, your request has been blocked. Click "Continue »" below to return to the previous page.

Device: Linksys WRT1900ACS
OpenWRT: openwrt-18.06 branch (git-18.210.69179-6df9a57) / OpenWrt 18.06.0 r7188-b0b5c64c22
luci-wrtbwmon: 0.8.1

speed not working

at least in openwrt 12.09.
I can see up and down accumulated kb, but speed is always 0.

Problems...

Hi...

I had "usage" working perfectly until version 18.06.6 of OpenWRT ...

I decided to update it to version 19.07.0 and from there, I notice that it doesn't work anymore ... I even see a stream on the screen, but it stopped at 3 MB and it doesn't work anymore ...

I would like a help to try to resolve. Today my internet arrives at the router through Vlan 10 and I don't know if that can interfere in any way, the operation of the program ...

I don't know if it is something related to monitoring or if it is something at Luci, because in version 19.07.0, some things were changed and eventually, they could be causing some problem.

Anyway, it is very useful for my monitoring.

Invalid time

The wrong time is displayed in the "First Seen" and "Last Seen" columns when any other time zone other than UTC is set. For example, if Asia/Bangkok is written (this is my time zone), then the time in the columns becomes 7 hours more from the present, while the local time in OpenWRT is displayed correctly, according to the time zone.

[Feature Request] More Auto Update Choices

Would it be possible to have more options for auto update? I like to have it refresh once per second, but to accomplish this I currently use a greasemonkey script to replace the value for Disabled with 1 second or edit the page source with the browser inspector.

On an unrelated note, in LuCI 'Usage Configuration' is not displayed under 'Usage', but under 'Diagnostics'. Would it be possible to group them together?

realtime and totals do not match real life

if for instance im on my laptop and download a file say 10mb in size. i do not get the true bandwidth used for that ip.
heres an example
192.168.1.154 usage speedtest.net
in the list of ip 192.168.1.154 total is only 649kb and the realtime is 72 b/s despite my speedtest.net going to 65mb/s
am i missing something ?
thanks

Same client shown more than once

Firstly, thank you so much for the recent changes, they're absolutely wonderful!

I've run into a small problem though, I have the same device appearing twice on two occasions in the usage details.

Here's a link to a screenshot, the devices in question are Printer 1 and Printer 2 https://www.dropbox.com/s/0ttu4c1txn6m4p4/Duplicate%20Clients.png?dl=0

And here is my custom user file:

1c:1b:0d:e5:60:f1,Bradley
d8:6c:63:72:7a:62,Chromecast 2
f0:03:8c:1e:2f:09,Brian
94:de:80:23:6a:1c,Grandma
c0:ee:fb:df:65:51,Bradley OP3
d0:73:d5:03:3d:c0,Bradley Lifx
d8:49:2f:e0:eb:88,Printer 1
60:12:8b:91:ca:29,Printer 2
e8:61:7e:22:02:11,Jarrod PS4
00:08:74:24:a3:25,Bradley Server
1c:1b:0d:97:b8:a2,Jarrod??

Hovering over Printer 1 and Printer 2 in the usage details shows that both results for Printer 1 have the same mac address and both results for Printer 2 have the same mac address as well.

It looks like they changed IP addresses and now they're being recognised as new devices, even though their mac address is still the same.

Is there any way to fix this other than assigning them static IP addresses?

Also, offtopic, but would it be possible to have the 'Submit' and 'Reset' buttons on the 'User File' page replaced with 'Save & Apply', 'Save' and 'Reset' buttons like in the configuration page and elsewhere in LuCI?

Thanks a lot for all your hard work, it's really appreciated!

module 'luci.model.ipkg' not found

I'm running the latest openwrt snapshot, and followed the installation instructions listed on the page. Version 6.0 works fine (except for the layout being slightly skewed by the theme) but any later version just stays on loading... indefinitely.

OpenWrt error information

I setup wrtbwmon and luci-wrtbwmon in OpenWrt Chaos Calmer and Barrier Breaker. But all of them can't display "Network Usage:". It display the same error in the Chrome and Opera browser.

This page contains the following errors:
error on line 156 at column 43: Specification mandate value for attribute selected
Below is a rendering of the page up to the first error.

That's the contents of the file /tmp/usage.db:

#mac,ip,iface,in,out,total,first_date,last_date
bc:e6:3f:61:be:5e,192.168.0.217,br-lan,3291879,689018,3980897,22-02-2017_22:41:18,22-02-2017_23:06:21
22:76:93:28:0e:44,192.168.0.251,br-lan,0,0,0,22-02-2017_22:41:18,22-02-2017_22:41:18
00:e1:4d:71:00:ba,192.168.0.254,br-lan,0,0,0,22-02-2017_22:41:18,22-02-2017_22:41:18
ba:ee:e3:bc:0d:b3,192.168.0.9,br-lan,0,0,0,22-02-2017_22:41:18,22-02-2017_22:41:18
00:c2:c6:9f:7a:0e,192.168.0.10,br-lan,0,0,0,22-02-2017_22:41:18,22-02-2017_22:41:18
98:83:89:29:01:4a,192.168.0.11,br-lan,171663132,170769018,342432150,22-02-2017_22:41:18,22-02-2017_23:06:21
00:c2:c6:9f:7a:0e,192.168.0.21,br-lan,0,0,0,22-02-2017_22:41:18,22-02-2017_22:41:18
b0:e2:35:07:c8:b6,192.168.0.121,br-lan,522662,43745,566407,22-02-2017_22:41:18,22-02-2017_23:06:21

Display current data - not aggregate

I'd like this application to also show me which clients use how much of bandwidth at this very moment. Not just aggregate data from the "billing period" of 1 month.

Error on loading "Usage Configuration"

Hello, after upgrading to version 7, (removing version 6 all the way, then opkg install luci-wrtbwmon7.ipk) I am greeted by an error when navigating to the "Usage Configuration" page.

/usr/lib/lua/luci/dispatcher.lua:433:
Failed to execute cbi dispatcher target for entry '/admin/network/usage_config'.
The called action terminated with an exception:
/usr/lib/lua/luci/cbi.lua:52: Model 'wrtbwmon' not found!
stack traceback:
[C]: in function 'assert'
/usr/lib/lua/luci/dispatcher.lua:433: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:168: in function </usr/lib/lua/luci/dispatcher.lua:167>

The same is listed in the System Log.

I have removed /tmp/luci-modulecache and /tmp/luci-indexcache with no change.

The wrtbwmon package is installed, enabled, and started. Normal monitoring function works OK.

install of luci_wrtbwmon fails

Hi
This one is a simple fix, and relates to Issue #34.. Same issue by the looks but was not fixed on instructions

In the instructions for install its says
scp luci_wrtbwmon_all.ipk [email protected]:/tmp/
opkg install /tmp/luci_wrtbwmon
_all.ipk

but based on download from release directory the ipk comes down as
luci-wrtbwmon_v0.8.3_all.ipk

Note the '-' after luci , and not a '_'

Just failed when running the opkg command, but was easily found what issue was.

Add option to keep track monthly

I'd like to see a option to keep track monthly. To save router storage space maybe once a month is over it can be condensed into one total line in the log. This would help me immensely since my ISP, Comcast, tracks my data usage and threatens to cancel after 1TB of usage.

Custom location for usage.db

I can see in issue #3 there was some discussion about a custom location for usage.db. I can see the GUI option to make this /etc/config/usage.db, which would allow it to persist over reboots. However, I would like to move it to my external USB drive, to reduce writes to the router's flash drive. (luci-app-statistics allows a similar configuration).

How can I change the location? I'm happy to hack the source code, but couldn't find anything obvious. I could see some reference in /usr/lib/lua/luci/model/cbi/wrtbwmon/config.lua, but this seemed to be more about moving the file.

I also found a reference in the dependency package wrtbwmon, in the file /etc/init.d/wrtbwmon. However, I wasn't sure if hacks to this file would then filter down to luci-wrtbwmon itself.

EDIT

I also tried persisting the file at /etc/config/usage.db, copying it to my USB drive, then symlinking it back to /etc/config/usage.db, but it seems that this file gets overwritten with a "normal" file instead of back to the symlink.

cannot link the mac addresses with hostname

I have filled the user file in Luci and can found the /etc/wrtbwmon.user is ok, but I cannot get hostname instead of MAC or IP address in the Usage page, the installed wrtbwmon version is 1.2.1-3 of (brvphoenix, thanks.

LEDE compatibility

I was wondering if this package will be compatible with LEDE, I am planning on switching from OpenWRT.

Failed to install

I'm getting this when trying to install. I also tried version 0.8.2 with the same results.
running OpenWrt 18.06.4
root@OpenWrt:/tmp# opkg install /tmp/luci_wrtbwmon_v0.8..3_all.ipk
Collected errors:

  • wfopen: /tmp/luci_wrtbwmon_v0.8.3_all.ipk: No such file or directory.
  • pkg_init_from_file: Failed to extract control file from /tmp/luci_wrtbwmon_v0.8.3_all.ipk.

Use a tab like interface to show Usage and config in the same page

Moved from #16 as a separate issue for clarity.

Research a little bit to see how to implement the tab interface that is widely used in LuCI modules.
This will allow the Usage module to appear as a single menu entry and everything associated with it (i.e. config page) to exist in the same page.

Not using defined Hostnames

Hi, firstly I'd like to thank you for this project, it is extremely useful and I use it on a daily basis.

The issue I am having is that in the usage list, several devices are listed by their mac address, even though they have a hostname defined (under Network > Hostnames) making them harder to recognise.

Would it be possible to use either the Hostname specified under Network > Hostnames or the hostname defined when giving a device a static IP (these aren't used either in the Network Usage page)?

Can i get a Video record for installation process? Please!

Im a newbie in OpenWRT. i need this on my router. I badly need this. i can't install this software properly. please anyone can make a video of this full installation process? i installed but there is all '0' Value on Usage Page. please help me.

Screenshot_4

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.