Alternate Per User Bandwith Monitoring (Directly On Router)

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Goto page Previous  1, 2, 3, 4, 5  Next
Author Message
raqua
DD-WRT User


Joined: 13 Feb 2014
Posts: 58

PostPosted: Sat Feb 14, 2015 20:07    Post subject: Reply with quote
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. Smile 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)
Sponsor
vortex05
DD-WRT User


Joined: 14 Mar 2014
Posts: 218

PostPosted: Sat Feb 14, 2015 20:48    Post subject: Reply with quote
Alright that's reasonable.

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 can incorporate this into the update.

Look for it on the version 1.1.1 update.
BliND123
DD-WRT Novice


Joined: 23 Jun 2008
Posts: 34

PostPosted: Sun Mar 15, 2015 19:12    Post subject: Reply with quote
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?
vortex05
DD-WRT User


Joined: 14 Mar 2014
Posts: 218

PostPosted: Sun Mar 15, 2015 22:28    Post subject: Reply with quote
you can follow the same instructions but you must mount your internal partition to Jffs or equivalent flash safe partition.

I recommend using this only on a router that has a USB because it does cause extra wear on the internal flash storage.

You can disable the auto backup in the script to reduce wear if that's an issue.
deadman36g
DD-WRT Novice


Joined: 09 Dec 2009
Posts: 13

PostPosted: Sat Jul 18, 2015 15:45    Post subject: Reply with quote
Having trouble getting this going.

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
vortex05
DD-WRT User


Joined: 14 Mar 2014
Posts: 218

PostPosted: Sat Jul 18, 2015 16:02    Post subject: Reply with quote
the site in question is user/bwmon.html
deadman36g
DD-WRT Novice


Joined: 09 Dec 2009
Posts: 13

PostPosted: Sat Jul 18, 2015 16:03    Post subject: Reply with quote
vortex05 wrote:
the site in question is user/bwmon.html


As seen oh github , problem fixed, I think it was me not being patient enough.
vortex05
DD-WRT User


Joined: 14 Mar 2014
Posts: 218

PostPosted: Sat Jul 18, 2015 16:06    Post subject: Reply with quote
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
Feni85
DD-WRT Novice


Joined: 01 Apr 2015
Posts: 15

PostPosted: Thu Jul 23, 2015 8:13    Post subject: Reply with quote
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?
vortex05
DD-WRT User


Joined: 14 Mar 2014
Posts: 218

PostPosted: Thu Jul 23, 2015 13:23    Post subject: Reply with quote
Mac address is actually resolved to the static dhcp leases. It's based on dnsmasq
patq911
DD-WRT Novice


Joined: 12 Sep 2015
Posts: 5

PostPosted: Sat Sep 12, 2015 3:20    Post subject: Reply with quote
Hey I'm sorry, I'm a noob.

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.
pattuspl
DD-WRT Novice


Joined: 09 May 2013
Posts: 19

PostPosted: Wed Oct 21, 2015 17:29    Post subject: Reply with quote
i get error wget bad address from github anyideas why?
delle54
DD-WRT Novice


Joined: 06 Sep 2015
Posts: 11
Location: Hannover, Germany

PostPosted: Sat Nov 07, 2015 0:10    Post subject: Reply with quote
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.
delle54
DD-WRT Novice


Joined: 06 Sep 2015
Posts: 11
Location: Hannover, Germany

PostPosted: Fri Nov 13, 2015 20:23    Post subject: Reply with quote
ext4 works now, when set to logical instead of primary drive.

WR 842ND V2.3 runs on build 28072 and WDR 3600 on 21061.

No stats. on /user/bwmon.html
vortex05
DD-WRT User


Joined: 14 Mar 2014
Posts: 218

PostPosted: Thu Feb 11, 2016 16:42    Post subject: Reply with quote
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.
Goto page Previous  1, 2, 3, 4, 5  Next Display posts from previous:    Page 2 of 5
Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum