I still think it would make sense to fix it also in the script (and maybe fix user generated file automatically on start), because then you have common base to work with.
I do not really care that much for the web page monitoring as I use this differently. What I do is that I have several scripts that monitor connected clients and I get warning email in case unknown client connects. I also get daily report every midnight about what clients were conencted that day, how much bandwidth was used during that day etc. I wanted to add report of bandwidth used per client, which is why I installed this. At first, I was using mac-names.js to get names for clients in the report, but then I realized that this would not work for the case, where that client does not have static IP assigned. I have some clients which do not get static IP, but are allowed on my network and I want to get email about them connecting. Like for example my mother-in-law. She is allowed to the network, but I get email about it and I know I should not hurry home. Her phone has hostname set up which is picked up by router and therefore I can identify this client even though it has no static IP.
In order to get this hostname in my reports, I needed to get the names from different file, where I track the known and unknown clients.
So I don't need those MAC addresses in the common format, but someone else might be building upon your work and it could be handy.
p.s. I also disabled backup of stats, because I want to reset them every midnight by deleting the file and I have no use for the backup file.
I will however keep an eye on your changes and merge them with mine. Thanks for your work. _________________ Netgear R7000 running BS DD-WRT build 26446 (home)
Keep in mind if the script is ever adjusted to get dns entries on every update I would have to re-evaluate this. I'm an efficiency nut and I try not and overload the script with too many extra cycles.
However seeing that it's in the startup script and it's not causing significant load on the router.
I'd like to install this on my router, it's a Rosewill RNX-N300RT this is what it shows on the about page: TP-Link TL-WR841ND v7 Firmware Version DD-WRT v24-sp2 (03/25/13) std - build 21061. From the instructions I need a USB port? This router has none, how can I do this?
I followed the intructions from github and everything seemed to be working but the user/bwmin.html page will not load for me.
I have it installed to /opt/
Code:
root@DD-WRT:/opt# wget https://github.com/vortex-5/ddwrt-bwmon/releases/download/1.2/bwmon.tar.gz
Connecting to github.com (192.30.252.131:443)
Connecting to s3.amazonaws.com (54.231.14.96:443)
bwmon.tar.gz 100% |*********************************************************************************************************************************************************| 85261 0:00:00 ETA
root@DD-WRT:/opt# tar -xzvf bwmon.tar.gz
bwmon/
bwmon/backup.sh
bwmon/bwmon-autobackup.sh
bwmon/bwmon-dnsmasq.sh
bwmon/bwmon-running.sh
bwmon/bwmon.sh
bwmon/clean.sh
bwmon/install.sh
bwmon/start.sh
bwmon/startup.sh
bwmon/stop.sh
bwmon/www/
bwmon/www/angular.min.js
bwmon/www/bootstrap.min.css
bwmon/www/bwmon.css
bwmon/www/bwmon.html
bwmon/www/bwmon.js
bwmon/www/mac-names.js
bwmon/www/ui-bootstrap-tpls-0.12.1.min.js
root@DD-WRT:/opt# cd /opt/bwmon/ && sh install.sh
Installation completed.
Type /opt/bwmon/startup.sh to start the script
You can visit the stats page by navigating to http://routerip/user/bwmon.html
as you can see my terminal looks good.
for router startup command I have,
/opt/bwmon/startup.sh
so I am not sure my problem.
I should note the following
I have a r7000 router (arm)
Firmware: DD-WRT v3.0-r27365M (06/18/15) kongac
Also, my flash drive is formatted to ext2
ok no problem I should probably state that the script will run 1min after startup this is by design to allow the router to complete tasks it generally needs to do on start.
If you want to make this go faster you can just execute ./start.sh instead of ./startup.sh
This tool is pretty awesome, it was quite some work to mount the NTFS partition on my flash drive as it did not automount but I succeeded.
If I read the previous posts correctly, mac-adresses should resolve to hostnames. Mine however do not, could you point me in a direction to solve this?
I successfully logged in through SSH, typed in wget...
connection to github...
and then nothing. It didn't download anything and didn't tell me what was wrong.
so I moved on to the USB. downloaded the file, put it on a usb, and it's mounting it to "/tmp/mnt/sda5". I don't know how to change it to jffs. (no place to change it, only something about a UUID which I have no idea what that is)
is it ok to run the script there?
DD-WRT v3.0-r27506 on a TPLINK TL-WDR3600 v1.
update: no it doesn't work there. it just says "next update in 10 seconds" and then when it "updates" it doesn't do anything.
I have a TP-Link WDR TL-3600 v1 with dd-wrt build 21061 and installed the latest version of DDWRT Bandwidth Monitor 1.5. on a USB-Stick formateted with ext2 (any other format didn't work).
Since I want to use the MAC-Table, I disabled the following in the "start.sh":
Quote:
# Create DNS Names from DNS Config (This maybe safely disabled if you wish to use a manual mac-names.js file)
# $SCRIPT_DIR/bwmon-dnsmasq.sh
Everthing seems to work fine, except the "/user/bwmon.html" only shows the header, but no users and traffic.
So we are several versions ahead now the new versions support both the old /user/bwmon.html and lighttpd ways of serving with lighttpd having the advantage of being instant or close to it with it's updates.
the script itself should now be mounted to
/jffs/bwmon
stats will still sit in
/tmp/www/usage-stats.js
I apologize for not monitoring the forums most users have been posting bugs directly on the github issue tracker and have had their problems resolved.
If you still are having trouble getting version 1.6.1 working please let me know.