dd-wrt - Bandwidth Usage Monitor

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 18, 19, 20 ... 40, 41, 42  Next
Author Message
kublai
DD-WRT User


Joined: 03 Mar 2007
Posts: 111

PostPosted: Wed May 04, 2011 11:04    Post subject: Reply with quote
What I meant is the update is not working for me so you'll have to wait for FeJay's new script to fix it.

[quote="munzab"]
FezJay wrote:
kublai wrote:
I got it working thanks, but I have a couple questions.

1. The script does not reset data usage at the begnning of the month.

2. Can the user_detils.js be run from the usb drive? I gave it dir in the 9th position and the use_detail.js file was created but will not update the 192.168.xx.xx/user/monitor.html age. When it's in /tmp/www then the status is updated.


I have had a look and I have found the problem

I was not working out the next day correctly, or to be more precise, the first day of a new month.

Basically it was skipping the first day, if you had your reset day at 2, would have worked fine lol.

I have made the fix and have checked it in.

In regards to your second question, the js file needs to be publicly available to the web page.

Technically, you can set up a web server that points to a directory on your flash drive. Allowing you to then save and read the js file from there.




where should i see the change?should i download a new wrtbwmon script file and just overwrite the one i have in the router already and not change anything in the startup script?
Sponsor
kublai
DD-WRT User


Joined: 03 Mar 2007
Posts: 111

PostPosted: Wed May 04, 2011 14:57    Post subject: Reply with quote
Another question:

How do you set an interval to backup the user_details.js file from the /tmp dir to /opt/monitor/www/? My router reboots alot for some reason and I would lose that file in RAM.

[quote="FezJay"]
kublai wrote:
I got it working thanks, but I have a couple questions.

1. The script does not reset data usage at the begnning of the month.

2. Can the user_detils.js be run from the usb drive? I gave it dir in the 9th position and the use_detail.js file was created but will not update the 192.168.xx.xx/user/monitor.html age. When it's in /tmp/www then the status is updated.


I have had a look and I have found the problem

I was not working out the next day correctly, or to be more precise, the first day of a new month.

Basically it was skipping the first day, if you had your reset day at 2, would have worked fine lol.

I have made the fix and have checked it in.

In regards to your second question, the js file needs to be publicly available to the web page.

Technically, you can set up a web server that points to a directory on your flash drive. Allowing you to then save and read the js file from there.
ultm8m
DD-WRT Novice


Joined: 03 May 2011
Posts: 3

PostPosted: Fri May 06, 2011 0:56    Post subject: Reply with quote
FezJay wrote:
ultm8m wrote:
Hi there,

My setup is dd-wrt v.24 running on a wrt54gl.
I mounted /vffs/ to a samba/network drive.

Everything seems to be running fine. The log file shows the packets and data consumption correctly for each device on the network.

The issue I am having is that the generated JS file includes no bandwidth data. It includes all the hosts/devices correctly, but no bandwidth usage stats.

I was wondering if someone knew why this would be happening?

Everything seems to be running fine, the JS file even updates when a new device is auto-added to the list.

Thanks, I appreciate the help.
ultm8m


Run the following commad.

iptables -L BWMON -vnx

Let me know that you are getting information and that the bytes figures are being cleared.

Then check the /tmp/ folder for the mac_usage file and ensure its been updated and it has figures.

If that is all working, you may need to check that you have the required packages installed (see wiki site)

Let me know how you get on.

A


Hey FezJay,

Alright, so I ran that command it it spat back some data which looked correct.

I then checked the usage file and noticed that theres no data except for the mac addresses.

ex:
Code:
00:15:F2:D8:F5:EE,192.168.1.116,,,05
1C:BD:B9:83:36:E0,192.168.1.123,,,05
20:CF:30:41:AD:F5,192.168.1.111,,,05
A8:E3:EE:43:C5:B5,192.168.1.105,,,05
00:11:24:A5:51:F8,192.168.1.122,,,05
00:01:29:A2:91:CB,192.168.1.136,,,05
00:16:EA:D3:73:42,192.168.1.118,,,05
00:00:00:00:00:00,192.168.1.101,,,05
90:E6:BA:10:0C:2D,192.168.1.115,,,05
00:1C:26:67:FB:53,192.168.1.129,,,05


I ran through the wiki and the only command I couldnt run is the echo "3 + 7" | bc

I installed the pkg and it works now.

edit: so when I removed the mac_usage.db file it re-makes it right away with values between the commas. Then the next refresh all the values are removed.

Thanks for the help,
ultm8m[/b]
nazzeem
DD-WRT Novice


Joined: 03 May 2011
Posts: 8

PostPosted: Fri May 06, 2011 6:22    Post subject: Reply with quote
After much reading and trying, I still cant get it to work. And also I dont really know what I`m doing.

This was my steps:
1. Upgrade Linksys WRT54GL v1.1 firmware to lastest stable DDWRT. (This went all well).
2.) Enable SSHD on router. (I am able to login with root)
3.) Enable JFFS2. (It says Total / Free Size 2,048.00 KB / 0) I can go to the /jffs directory, but it is read only. I tested by doing touch somefile command in the /jffs directory. I wanted to store the bm files here thinking they wont disappear after reboot.
4.) Run the commands to install bc. This fails with file not found & white russian errors as in screenshot below.
5.) I could download the bw_monitor.sh and monitor.html files and make the bw_monitor.sh executable, but obviously they disappear after rebooting the router.
6.) I found where to put the startup script and just copied the sample as in screenshot. Not sure where to put the shutdown script.

I checked the required commands and found I cannot run bc. I tried to install it by download first "wget http://downloads.openwrt.org/kamikaze/8.09.2/brcm47xx/packages/bc_1.06.94-1_mipsel.ipk" and then install "ipkg -d root install bc_1.06.94-1_mipsel.ipk". But it wont install see screenshot.


I did download the packages. Here my /tmp does not contain them.


After downloading and making executable they are there


Here is the startup script. I think the format is correct and it is in the right place? I am not sure where the shutdown script goes.


Can someone help please. I dont speak linux. I did read http://code.google.com/p/lal-projects/wiki/bw_monitor_setup but get lost. I need some help please.
orionshock
DD-WRT Novice


Joined: 29 Apr 2011
Posts: 45

PostPosted: Fri May 06, 2011 7:00    Post subject: Reply with quote
TBH if you don't have USB or ways to install this via cifs, then you shouldn't. If you really want it then i'd recommend you get a new router.
nazzeem
DD-WRT Novice


Joined: 03 May 2011
Posts: 8

PostPosted: Fri May 06, 2011 7:10    Post subject: Reply with quote
Do you mean the WRT54GL v1.1 router does not support the dd-wrt - Bandwidth Usage Monitor?
Can I use online storage?
orionshock
DD-WRT Novice


Joined: 29 Apr 2011
Posts: 45

PostPosted: Fri May 06, 2011 18:18    Post subject: Reply with quote
nazzeem wrote:
Do you mean the WRT54GL v1.1 router does not support the dd-wrt - Bandwidth Usage Monitor?
Can I use online storage?

It'll do it, just that with out USB Storage it's a lot more difficult.
nazzeem
DD-WRT Novice


Joined: 03 May 2011
Posts: 8

PostPosted: Sat May 07, 2011 7:48    Post subject: Reply with quote
orionshock wrote:
nazzeem wrote:
Do you mean the WRT54GL v1.1 router does not support the dd-wrt - Bandwidth Usage Monitor?
Can I use online storage?

It'll do it, just that with out USB Storage it's a lot more difficult.


I cannot afford to buy a new router now. But if I save up to buy one, I would rather get a mikrotik that supports all that I need.

I just need this monitor as I want to share my internet with 2 or 3 neighbours and allow them a certain amount of usage on a monthly basis.

Orionshock: What do you mean by dufficult? Is it not possible to make a new folder on root or make /JFFS writable? Or cant one use an FTP server?
j0n00
DD-WRT Novice


Joined: 07 May 2011
Posts: 1

PostPosted: Sat May 07, 2011 14:43    Post subject: Reply with quote
I'm having a similar problem to ultm8m, except that I have installed bc, and the usage file shows up 0 usage. When I run the command iptables -L BWMON -vnx I get the following:

Code:
Chain BWMON (0 references)
    pkts      bytes target     prot opt in     out     source               destination


And when I run the iptables test (iptables -L FORWARD) I get the following:

Code:
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     gre  --  192.168.0.0/24       anywhere            [8 bytes of unknown target data]
ACCEPT     tcp  --  192.168.0.0/24       anywhere            UNKNOWN match `tcp' [8 bytes of unknown target data]
ACCEPT     all  --  anywhere             anywhere            [8 bytes of unknown target data]
TCPMSS     tcp  --  anywhere             anywhere            UNKNOWN match `tcp' [8 bytes of unknown target data]
iptables v1.4.7: Couldn't load target `standard':File not found

Try `iptables -h' or 'iptables --help' for more information.


Any ideas what the problem is?
orionshock
DD-WRT Novice


Joined: 29 Apr 2011
Posts: 45

PostPosted: Sat May 07, 2011 20:43    Post subject: Reply with quote
nazzeem wrote:
orionshock wrote:
nazzeem wrote:
Do you mean the WRT54GL v1.1 router does not support the dd-wrt - Bandwidth Usage Monitor?
Can I use online storage?

It'll do it, just that with out USB Storage it's a lot more difficult.


I cannot afford to buy a new router now. But if I save up to buy one, I would rather get a mikrotik that supports all that I need.

I just need this monitor as I want to share my internet with 2 or 3 neighbours and allow them a certain amount of usage on a monthly basis.

Orionshock: What do you mean by dufficult? Is it not possible to make a new folder on root or make /JFFS writable? Or cant one use an FTP server?


The older router's just don't have the space on board, if you can setup CIFS though the ddwrt gui you'd be better off.. granted it'll require at least 1 computer on all the time, or a NAS
nazzeem
DD-WRT Novice


Joined: 03 May 2011
Posts: 8

PostPosted: Sun May 08, 2011 8:54    Post subject: Reply with quote
orionshock wrote:
nazzeem wrote:
orionshock wrote:
nazzeem wrote:
Do you mean the WRT54GL v1.1 router does not support the dd-wrt - Bandwidth Usage Monitor?
Can I use online storage?

It'll do it, just that with out USB Storage it's a lot more difficult.


I cannot afford to buy a new router now. But if I save up to buy one, I would rather get a mikrotik that supports all that I need.

I just need this monitor as I want to share my internet with 2 or 3 neighbours and allow them a certain amount of usage on a monthly basis.

Orionshock: What do you mean by dufficult? Is it not possible to make a new folder on root or make /JFFS writable? Or cant one use an FTP server?


The older router's just don't have the space on board, if you can setup CIFS though the ddwrt gui you'd be better off.. granted it'll require at least 1 computer on all the time, or a NAS


Is one able to setup CIFS using an FTP server on the internet?
orionshock
DD-WRT Novice


Joined: 29 Apr 2011
Posts: 45

PostPosted: Sun May 08, 2011 19:11    Post subject: Reply with quote
nazzeem wrote:

Is one able to setup CIFS using an FTP server on the internet?

No that would be FTP not CIFS Smile
orionshock
DD-WRT Novice


Joined: 29 Apr 2011
Posts: 45

PostPosted: Sun May 08, 2011 19:14    Post subject: Reply with quote
j0n00 wrote:

And when I run the iptables test (iptables -L FORWARD) I get the following:

Code:
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     gre  --  192.168.0.0/24       anywhere            [8 bytes of unknown target data]
ACCEPT     tcp  --  192.168.0.0/24       anywhere            UNKNOWN match `tcp' [8 bytes of unknown target data]
ACCEPT     all  --  anywhere             anywhere            [8 bytes of unknown target data]
TCPMSS     tcp  --  anywhere             anywhere            UNKNOWN match `tcp' [8 bytes of unknown target data]
===> iptables v1.4.7: Couldn't load target `standard':File not found <===

Try `iptables -h' or 'iptables --help' for more information.


Any ideas what the problem is?


That line is iptables being broken on your router btw.. such errors should not occur when running that command.
nazzeem
DD-WRT Novice


Joined: 03 May 2011
Posts: 8

PostPosted: Mon May 09, 2011 7:17    Post subject: Reply with quote
orionshock wrote:
nazzeem wrote:

Is one able to setup CIFS using an FTP server on the internet?

No that would be FTP not CIFS Smile


Ok. So if I decide to get a new router, should I rather look at a Mikrotik?
kc6108
DD-WRT User


Joined: 28 Jun 2008
Posts: 195

PostPosted: Mon May 09, 2011 18:48    Post subject: Reply with quote
[quote="FezJay"]
kublai wrote:
I got it working thanks, but I have a couple questions.

1. The script does not reset data usage at the begnning of the month.

I have had a look and I have found the problem

I was not working out the next day correctly, or to be more precise, the first day of a new month.

Basically it was skipping the first day, if you had your reset day at 2, would have worked fine lol.

I have made the fix and have checked it in.


Where are the latest changes being checked in?
Goto page Previous  1, 2, 3 ... 18, 19, 20 ... 40, 41, 42  Next Display posts from previous:    Page 19 of 42
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware 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 can attach files in this forum
You can download files in this forum