Per-user Live Down/Upload Rate Monitoring [No PC needed!]

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Contributions Upload
Goto page Previous  1, 2, 3 ... 7, 8, 9, 10, 11, 12  Next
Author Message
ddwrt2therescue
DD-WRT Novice


Joined: 26 Jul 2011
Posts: 1

PostPosted: Tue Jul 26, 2011 22:17    Post subject: Reply with quote
Like optddwrt I'm a network newb but I really need to get this script working because I have several roommates and need to figure out who is killing our bandwidth cap. I tried to make my questions a little more specific to hopefully help speed up the process. I apologize in advance if some or all of these questions are ridiculously easy.

-btw I'm currently running DD-WRT v24-sp2 (08/07/10) mini on a Linksys WRT150N v1

1.) I downloaded wrtbwmon but don't know where to put it or how to give it permissions. My router doesn't have a usb slot so does this mean I need to set up a shared folder on my win7 computer? If so what ip/user name is the router (or how do I look that up) so I can give it the execution permissions it needs?

2.) "Make sure you change your wrtbwmon location depending on where you place it" so would this mean changing "/mmc/wrtbwmon" to something like "\\my-pc-name\shared-folder\mmc\wrtbwmon"?

3.) "Also change your MAC-to-PCname list's file path accordingly or remove that chain if you're not using it. " I understand this is the "/mmc/MAC-PCname.txt" part of the script but have no idea what to update that file name to be, or if i need that line of the script at all.

Any help is greatly appreciated!
Sponsor
kol262
DD-WRT Novice


Joined: 25 Aug 2011
Posts: 2

PostPosted: Thu Aug 25, 2011 8:26    Post subject: Reply with quote
i want to run this script but do not know how. I have dd-wrt set up on a dlink dir-615 router. I tried pasting the script in the command panel and running the script from there with no luck.

Can somebody explain how to run this script? I cannot place this on a usb or sd card as the router does not support this function. How would i run this script within the router itself?
Nythain
DD-WRT Novice


Joined: 21 Nov 2011
Posts: 1

PostPosted: Mon Nov 21, 2011 2:45    Post subject: Reply with quote
Sorry if this is necro threading, but I really had to say THANK YOU! I had tried the two other popular monitoring scripts to no avail, and your modification worked like a charm on the first attempt. Now I know exactly which flatmate is clogging my tubes with an uncapped upstream.
jaesun
DD-WRT User


Joined: 19 Feb 2010
Posts: 59

PostPosted: Tue Nov 29, 2011 2:54    Post subject: Reply with quote
couple questions.

1. I cannot get the page to show up within the dd-wrt MyPage WebGUI. It just shows a blank page, but without the statistics.

I can view the usage.html (cat /tmp/usage.html) and see the statistics in telnet, or if I copy the file to /tmp/www/usage.html, I can view the statistics at http://MyIp/user/usage.html . Did I miss something? I made sure usage.sh is executable (chmod +x /tmp/smbshare/router/wrtbwmon/usage.sh) Also, if I run the usage.sh script, it doesn't seem to run the cat /tmp/usage.html command within the usage.sh script.


2. Lastly, does the usage reset every month? or does it just keep adding to the total into the DB (and to reset I can just delete the database) ?

I think a suggestion to improve this is to break out the statistics by a monthly basis.

Router: : DD-WRT v24-sp2 (08/07/10) std Linksys WRT300N v1


Edit: For Question 1, I fixed it by replacing this line:
Code:
cat /tmp/usage.html

With this line:
Code:
n=`cat /tmp/usage.html`
echo "$n"
aag
DD-WRT Novice


Joined: 27 Nov 2011
Posts: 9

PostPosted: Sun Jan 15, 2012 14:18    Post subject: Reply with quote
That's pretty awesome! Props to both OP and grant for posting some useful info here.
markiansaclot
DD-WRT Novice


Joined: 20 Feb 2012
Posts: 5

PostPosted: Wed Feb 29, 2012 20:22    Post subject: will this work on linksys E1000? Reply with quote
will this work on linksys E1000 with Firmware: DD-WRT v24-sp2 ?
mr.619
DD-WRT Novice


Joined: 28 Feb 2012
Posts: 1

PostPosted: Thu Mar 01, 2012 2:12    Post subject: Reply with quote
hey.. i try to run your script and did it successfully... but why in user columns, it only showed mac address ? should i do something to show the user name ?

thanks for anyone help...
cvermeir
DD-WRT Novice


Joined: 05 Mar 2012
Posts: 2

PostPosted: Mon Mar 05, 2012 10:12    Post subject: Reply with quote
can any-one, post a tutorial how to build this item on a usb stick and how to make it reset on a certain date, beginning from a standard setup of ddwrt?
ty ;p
advancenetworking
DD-WRT Novice


Joined: 31 Mar 2012
Posts: 16

PostPosted: Sat Mar 31, 2012 11:19    Post subject: Reply with quote
I am new to DD-WRT I don't know what you mean Step 2 So if you can tell me how would I put the file to router and what file would be great Sad sorry I am new to all this I am using WNDR3700




Joined: 01 Jan 1970
Posts:

PostPosted: Sun Jun 10, 2012 17:26    Post subject: Reply with quote
I am using my /jffs (500 mb pendrive) as a storage of usage.db and wrtbwmon. It's all running on my WNDR3700v2 b18777.


I use this startup script:

Code:
sleep 10

# Load database
cp /jffs/usage.db /tmp/usage.db

# Bandwidth Download/Upload Rate Counter
while :
do
/jffs/wrtbwmon setup
/jffs/wrtbwmon read
sleep 9
/jffs/wrtbwmon update /tmp/usage.db
/jffs/wrtbwmon publish /tmp/usage.db /tmp/www/usage.html /jffs/MAC-PCname.txt
done &

# Backup usage database file
while :
do
sleep 900
cp /tmp/usage.db /jffs/usage.db
done


The 192.168.0.1/user/usage.html works but the table is empty - no entries and the usage.db looks like this:

Code:
1c:6f:65:b5:c1:3d,312,39,312,39,10-06-2012 23:02
fc:a1:3e:71:08:4a,8,1,8,1,10-06-2012 23:02
00:24:8c:42:5f:9b,0,22,0,22,10-06-2012 23:03
00:25:d3:c3:5d:5b,51,30,51,30,10-06-2012 23:03
00:24:1d:00:9e:90,18,18,18,18,10-06-2012 23:03
00:24:8c:42:60:c6,423,106,423,106,10-06-2012 23:03
00:04:e2:c4:2a:2a,121,1610,121,1610,10-06-2012 23:03


What am I doing wrong ?




Joined: 01 Jan 1970
Posts:

PostPosted: Wed Jun 13, 2012 16:58    Post subject: Reply with quote
I guess this thread is dead.
benawhite
DD-WRT Novice


Joined: 18 Sep 2012
Posts: 1

PostPosted: Wed Sep 19, 2012 14:48    Post subject: Reply with quote
MacMillan wrote:
What am I doing wrong ?


I had this same issue, and it was rooted in the missing "sort" function from atheros builds of dd-wrt.

I simply removed that as a dependency from the code, and told the browser to sort the data rather than the router.

I also added a totals line and some better styling.

I have attached the updated wrtbwmon file.
I will most likely be updating this file to add more features and better reporting in the future if there is any interest.

the .txt extension should be removed, but was required to attach file to this post
Rooslin
DD-WRT Novice


Joined: 30 Oct 2012
Posts: 3

PostPosted: Tue Oct 30, 2012 22:43    Post subject: Reply with quote
now i hate to ask this but i have no idea how to implement this and if someone could give a step by step guide for dummies that would be greatly appreciated

(we are going over our monthly limit and we are trying to find the source)
lucasmeister
DD-WRT Novice


Joined: 02 Nov 2012
Posts: 1

PostPosted: Sat Nov 03, 2012 9:00    Post subject: Thanks! Reply with quote
benawhite wrote:
MacMillan wrote:
What am I doing wrong ?


I had this same issue, and it was rooted in the missing "sort" function from atheros builds of dd-wrt.

I simply removed that as a dependency from the code, and told the browser to sort the data rather than the router.

I also added a totals line and some better styling.

I have attached the updated wrtbwmon file.
I will most likely be updating this file to add more features and better reporting in the future if there is any interest.

the .txt extension should be removed, but was required to attach file to this post


Thanks! It's working perfectly with your modifications, running it on Asus RT-N10+ (DD-WRT v24-sp2 (04/13/11) std - build 16785 | Ralink SoC) from /tmp.
leonardox
DD-WRT Novice


Joined: 21 Sep 2012
Posts: 10

PostPosted: Sat Nov 03, 2012 10:11    Post subject: Reply with quote
Thanks at benawhite, now i can see the list on IP/user/usage.html.

But i want to move the list to the mypage, but what ever i try i get just a blank list.

- all sckrips are execute
- i replaced cat /tmp/usage.html
whith n=`cat tmp/usage.html`
echo "$n" but there is no different

an sh /opt/kodi/usage.sh let me see the MAC Table.

What's wrong?
Goto page Previous  1, 2, 3 ... 7, 8, 9, 10, 11, 12  Next Display posts from previous:    Page 8 of 12
Post new topic   Reply to topic    DD-WRT Forum 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