kiougar / luci-wrtbwmon Goto Github PK
View Code? Open in Web Editor NEWBandwidth tracker for OpenWRT that uses wrtbwmon
Home Page: https://github.com/pyrovski/wrtbwmon
License: MIT License
Bandwidth tracker for OpenWRT that uses wrtbwmon
Home Page: https://github.com/pyrovski/wrtbwmon
License: MIT License
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
如果能同时显示 ipv6 和ipv4 流量就好了 以mac 分组
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:
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```
$ 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.
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.
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.
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>
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 ?
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.
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
at least in openwrt 12.09.
I can see up and down accumulated kb, but speed is always 0.
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.
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.
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?
Can you add this to OpenWRT repo?
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
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!
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.
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
I cannot get this to work on a Bridged AP (https://wiki.openwrt.org/doc/recipes/bridgedap)
No traffic seems to get recorded on the usage page. Seems to install and display okay though.
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.
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.
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.
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.
The href "<%=controller%>admin/network/usage_config"
should be formatted like "<%=controller%>/admin/network/usage_config"
on wrtbwmon.htm@L4
when Software flow offloading enabled ,i'm getting 0 download kbps using openwrt 18.06.2 Netgear r7800
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.
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.
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.
I was wondering if this package will be compatible with LEDE, I am planning on switching from OpenWRT.
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:
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.
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)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.