ip_conntrack with QoS and bandwidth use reporting

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


Joined: 24 Feb 2011
Posts: 1044

PostPosted: Tue Jun 12, 2012 18:16    Post subject: Reply with quote
@alexatkinuk

Thank you for sharing your script.
I'm trying to integrate your script within mypage besides bwmon. hope you don't mind Wink

So far all is working except but the bandwith summary isn't showing the stacked clients.
From time to time a client pops up but most of the times no clients are shown.
Or they are stacked above each other instead of in line as the screenshots show on page.

Changes i made are only to the layout of qos_conntrack.sh renaming and matching the looks to the other mypage scripts.
Funtions and tables etc. i did not change.
The javascript hasn't changed.
in the traffic monitor i have moved from RRDIPT to DIPTRR since bwmon clear the statistics.

Could you please give me some pointers.

thanks
basmaf.
Sponsor
jfish99
DD-WRT User


Joined: 25 Aug 2011
Posts: 83

PostPosted: Thu Jun 28, 2012 21:29    Post subject: Reply with quote
running following ddwrt version

Router Name DIR-615-D4-A
Router Model Dlink-DIR615 rev d
Firmware Version DD-WRT v24-sp2 (03/19/12) std - build 18777

I get calculating on the page

Using Chrome and debugging gives this error

Uncaught ReferenceError: ASSURED is not defined
(anonymous function)
(anonymous function) qos_conntrack.js:377
StatusUpdate.doUpdate.request.onreadystatechange common.js:833
jumran
DD-WRT User


Joined: 31 Jul 2009
Posts: 492
Location: Toronto, ON, CA

PostPosted: Fri Jun 29, 2012 0:14    Post subject: Reply with quote
jfish99 wrote:
running following ddwrt version

Router Name DIR-615-D4-A
Router Model Dlink-DIR615 rev d
Firmware Version DD-WRT v24-sp2 (03/19/12) std - build 18777

I get calculating on the page

Using Chrome and debugging gives this error

Uncaught ReferenceError: ASSURED is not defined
(anonymous function)
(anonymous function) qos_conntrack.js:377
StatusUpdate.doUpdate.request.onreadystatechange common.js:833


I had the same issue as well. basmaf is working on getting script integrated with MyPage and working properly with newer builds so wait for it to get released.

_________________
Asus RT-N16 [Build King Kong 18050M NEWD-2 K2.6 + Optware + My Page] Mr. Green
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1044

PostPosted: Fri Jun 29, 2012 6:02    Post subject: Reply with quote
@ jfish99 & jumran

How many clients are connected?

Please change the update interval in traffic_monitor.sh
change sleep 1 into 5

Let me know if that resolves the problem.
I think there is too much to process in 1 second.
jfish99
DD-WRT User


Joined: 25 Aug 2011
Posts: 83

PostPosted: Sun Jul 01, 2012 13:43    Post subject: Reply with quote
basmaf wrote:
@ jfish99 & jumran

How many clients are connected?

Please change the update interval in traffic_monitor.sh
change sleep 1 into 5

Let me know if that resolves the problem.
I think there is too much to process in 1 second.


I have about 10 clients connected. I think I know why I have the problem, I havent enabled QoS on the router.
Howt
DD-WRT Novice


Joined: 26 Aug 2012
Posts: 6

PostPosted: Wed Aug 29, 2012 18:11    Post subject: Reply with quote
FWIW... I have provided a version of this script with changes. It may or may not suit your needs.

The enhancement provides for persistent periodic bandwidth reporting by day, host, IP address, or combination thereof. It does not display anything extra within DD-WRT. Rather, it primarily provides JavaScript data used to create HTML reports.
    Daily reporting in addition to point in time.
    Less write wear on flash memory - 25 writes/day v. 86,400.
    Less CPU intensive (simply runs less often).
    No data loss upon GUI/Telnet/SSH reboot.
    HTML reports with Javascript library for further development.
    Hosts defined by DHCP static leases and/or external file.
On the downside, the MyPage display is significantly less responsive. My objective is geared more towards reporting.

Details are posted here: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=161071

Everything in the original work by alexatkinuk is retained including the slick MyPage display incorporated into the DD-WRT menus.

_________________
Asus RT-N16 DDWRT v24-sp2 (11/21/10) big Build 15778
Bob3Rocks
DD-WRT Novice


Joined: 19 Sep 2012
Posts: 1

PostPosted: Wed Sep 19, 2012 19:54    Post subject: Reply with quote
I am running the script on version DD-WRT v24-sp2 mini(SVN revision 14896.)

Under active connections on MyPage it does not appear to be showing qos correctly. Almost all traffic shows as n/a.

I know traffic is being categorized correctly based on the output of cat /proc/net/ip_conntrack.

Update: I fixed my problem!

The issue is with traffic_monitor.sh. The if statement:

if [ $CONNTRACK -eq 19 ];

From the command line I found in my case this number is 16 by running this command:
tail -n1 /proc/net/ip_conntrack | awk 'END { print NF; }'

So through trial and error I changed two lines of code. I changed 19 to 16 and I changed $(NF-1) to $(NF).

This code is working correctly now:


if [ $CONNTRACK -eq 16 ]; then
awk 'BEGIN { printf "{ip_conntrack::"} { gsub(/(src|dst|sport|dport|mark)=/, ""); printf "'\''%s'\'','\''%s'\'','\''%s'\'','\''%s'\'','\''%s'\'',%s,",$1,$1 == "tcp" ? $5 : $4,$1 == "tcp" ? $7 : $6,$1 == "tcp" ? $6 : $5,$1 == "tcp" ? $8 : $7,$(NF); } END { print "'\''-'\''}"}' /proc/net/ip_conntrack >> /tmp/traffic.dat
Rooslin
DD-WRT Novice


Joined: 30 Oct 2012
Posts: 3

PostPosted: Tue Oct 30, 2012 23:19    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)

ill post this here as well since its in the same as what iam looking for
irosaurus
DD-WRT Novice


Joined: 28 Jun 2011
Posts: 42

PostPosted: Fri Nov 02, 2012 18:34    Post subject: Reply with quote
Rooslin wrote:
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)

ill post this here as well since its in the same as what iam looking for


if you are just looking for client bandwidth I would suggest you basmafs modified OTRW.
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=693967
that should satisfy your needs Wink

cheers iro

_________________
E4200 running DD-WRT v24-sp2 vpnkong r20780M enhanced with OTRW Take2
Fritzbox 7170 as Gateway and for VOIP with Freetz 1.2 Stable
DarkKnight93
DD-WRT Novice


Joined: 28 Jun 2010
Posts: 40

PostPosted: Sat Nov 17, 2012 17:39    Post subject: Reply with quote
wow you really did well on that script :) works like charm.

I just was so impressed so i thought i might do something useful.
Here is the qos_conntrack.sh (showing myPage) with vaild xhtml output.

Feel free to use it (:

[created upon qos_conntrack_0.13c.zip]
rbngan
DD-WRT Novice


Joined: 22 Aug 2008
Posts: 3

PostPosted: Sun Dec 16, 2012 4:23    Post subject: client bandwith monitor Reply with quote
irosaurus

[quote="irosaurus"]
Rooslin wrote:

if you are just looking for client bandwidth I would suggest you basmafs modified OTRW.
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=693967
that should satisfy your needs Wink

cheers iro


I followed that link and I don't see how that provides a client bandwith. Am I missing something? Since I have av Atheros unit I followed the link which took me to http://dd-wrt.ca/phpBB2/viewtopic.php?t=86912&postdays=0&postorder=asc&highlight=optware&start=315. I followed that all seam to have installed well with no errors, however,I don't see any changes. How or where can I find the instructions to have a bandwidth monitor per client in this OTRW/Optware instructions?
irosaurus
DD-WRT Novice


Joined: 28 Jun 2011
Posts: 42

PostPosted: Sun Dec 16, 2012 11:19    Post subject: Reply with quote
Hey rbngan,

unfortunately, TAKE2 by basmaf does not support Atheros devices, nor, to my knowledge, does OTRW by frater... (correct me if I'm wrong bas Wink )
which means, the new included mypage sites are not included in the link you provided.
I don't know if anyone managed to install mypage on a Atheros device, as I do not own one Wink
but if so, you should find an answer somewhere in the forum.

I suppose the easiest way to get your stats would be to buy a router with a Broadcom chipset.

Cheers iro

_________________
E4200 running DD-WRT v24-sp2 vpnkong r20780M enhanced with OTRW Take2
Fritzbox 7170 as Gateway and for VOIP with Freetz 1.2 Stable
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1044

PostPosted: Fri Dec 21, 2012 9:14    Post subject: Reply with quote
No sorry i don't support atheros.
I don't own an atheros router.

I know there are some differences between atheros and bcm.
It seems that not all commands are available in busybox.

You could try to use my version of mypage.
But i can't guarantee it will work.

Make sure external storage is mounted to /opt
Code:
mkdir -p /opt/etc/init.d
wget -O /tmp/install_mypage.sh http://ddwrt-trunk.basmaf.com/install_mypage.sh
sh /tmp/install_mypage.sh
sh /opt/etc/init.d/S99mypage start
saadsarwar
DD-WRT Novice


Joined: 12 Dec 2012
Posts: 27

PostPosted: Mon Dec 24, 2012 10:45    Post subject: Reply with quote
I have TL-WR1043ND with Firmware: DD-WRT v24-sp2 (08/07/10) std. I want to know would the bandwidth monitoring script would work on my router ?
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1044

PostPosted: Wed Dec 26, 2012 7:39    Post subject: Reply with quote
saadsarwar wrote:
I have TL-WR1043ND with Firmware: DD-WRT v24-sp2 (08/07/10) std. I want to know would the bandwidth monitoring script would work on my router ?


Try my previous post.
Like I said not sure if it will work but can at least try
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next Display posts from previous:    Page 5 of 7
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