I have the same sec0 is not defined error. I'm running
DD-WRT v24-sp2 (08/07/10) std - build 14896 on a TP-Link TL-WR1043ND. I also get the error of 2 missing javascript files: pie.js and wz_jsgraphics.js
And now i can see the traffic per client. I still cant see the hostnames of the clients.(I added my server to /tmp/hosts manually). The 192.168.100.252 ip is my upc cable router connected to the wan port. Network setup: [upc modem/router] --- [wan port of dd-wrt router]. I dont know why it is in this clients list.
When i run the traffic_monitor sh script my router cpu load increases from ~5% to ~35%.
Fixed the sec0 error for me. As you can see in cyberde's conntrack file, there is a secmark=0. The script removes the mark= part, so sec0 remains. In traffic_monitor.sh, line number 48 you need to change
Code:
$(NF-1)
to
Code:
$(NF-2)
Thanks alexatkinuk for this nice script!
The only problem remains that the name of every client is a '*'. I hope the router can handle the cpu usage.
Edit: Found a bug, when i click on a client's ip adress i get an javascript alert with the message 'undefined'
Joined: 07 Dec 2010 Posts: 131 Location: Sheffield, UK
Posted: Fri Jan 28, 2011 6:48 Post subject:
Yes, that was what I thought the issue was but I did not want to suggest making that change as I wanted to know what the field was, so I could detect if it was present or not in traffic_monitor automatically.
The question for me though, why did the contents of ip_conntrack change in newer DD-WRT? A change in the kernel itself?
The alert with undefined is not a bug, its actually intended, an easter egg of sorts. Its debugging code as I want it so if you click on an IP address it does an nslookup on that IP, then remembers the results in the hosts array until you reload the page. I just haven't done it yet. _________________ 2xWZR-HP-G300NH(B) (B0 B0) DD-WRT v24-sp2 (06/14/11) std 17201
One antenna swapped for an RP-SMA connector and 14dB external Yagi.
http://csdprojects.co.uk/ddwrt/
Joined: 07 Jun 2006 Posts: 1488 Location: the Netherlands
Posted: Sun Jan 30, 2011 9:15 Post subject:
Changing $(NF-1) to $(NF-2) didn't work on my router tho.
Will wait for your update _________________ Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N
Joined: 07 Dec 2010 Posts: 131 Location: Sheffield, UK
Posted: Thu Feb 03, 2011 1:02 Post subject:
cyberde wrote:
Changing $(NF-1) to $(NF-2) didn't work on my router tho.
Will wait for your update
If that doesn't fix it, I have no idea the cause so it wont get fixed I'm afraid. :(
[EDIT]
Sorry, forum logged me out for some reason do I didn't realise you had included the files I asked for. There is some hope in that case, I will certainly look into it. _________________ 2xWZR-HP-G300NH(B) (B0 B0) DD-WRT v24-sp2 (06/14/11) std 17201
One antenna swapped for an RP-SMA connector and 14dB external Yagi.
http://csdprojects.co.uk/ddwrt/
Last edited by alexatkinuk on Mon Feb 07, 2011 10:20; edited 1 time in total
Joined: 07 Dec 2010 Posts: 131 Location: Sheffield, UK
Posted: Mon Feb 07, 2011 11:59 Post subject:
What browser are you using? You need to find the javascript console and see what error it is reporting.
In Firefox:
Tools menu, Error console.
In Google Chrome:
Right click on the page, Inspect Element, click on Console. _________________ 2xWZR-HP-G300NH(B) (B0 B0) DD-WRT v24-sp2 (06/14/11) std 17201
One antenna swapped for an RP-SMA connector and 14dB external Yagi.
http://csdprojects.co.uk/ddwrt/
(its only traffic_monitor.sh that needs changing) _________________ 2xWZR-HP-G300NH(B) (B0 B0) DD-WRT v24-sp2 (06/14/11) std 17201
One antenna swapped for an RP-SMA connector and 14dB external Yagi.
http://csdprojects.co.uk/ddwrt/
I've been looking at these scripts for a bit now, but I am very new to linux/iptables/scripts etc and not had the bottle to install one yet.
This one does look very interesting though. Just a couple of questions.
What time period do the stats cover?
Also,I see that another poster was trying to record historical data for each client and that's what I am hoping to achieve eventually too. Could this be done by using a USB Key or HDD plugged into the router if supported?
Joined: 07 Dec 2010 Posts: 131 Location: Sheffield, UK
Posted: Tue Feb 08, 2011 16:58 Post subject:
ddempsey wrote:
I find it very slow and sometimes it hangs on firefox3.6.13/ie8
Unfortunately I have experienced the same though usually only when the router is under load.
It seems the browser hangs if the router is taking a while to respond to a request for new data. I think its an issue with trying to update every second so one request overlaps another if it takes too long. I am making a few minor changes so you can reduce the refresh rate if you have problems.
In the meantime, I would recommend using Google Chrome as its fast Javascript engine seems to really help reduce the frequency of problems.
nathanf wrote:
Hi there,
I've been looking at these scripts for a bit now, but I am very new to linux/iptables/scripts etc and not had the bottle to install one yet.
This one does look very interesting though. Just a couple of questions.
What time period do the stats cover?
Also,I see that another poster was trying to record historical data for each client and that's what I am hoping to achieve eventually too. Could this be done by using a USB Key or HDD plugged into the router if supported?
Thanks in advance,
Nathan.
The stats time period is from the time you started the traffic_monitor.sh script up until something resets those stats. My script currently never resets them, however the router rebooting or saving any changes in the DD-WRT control panel does.
Its actually something I have been thinking about, how to keep track of when the stats were last reset.
This ties into your second question as I think the only way to keep track would be to log the results and compare them, so if they reset you can make a note of when it happened.
The problem is that for it to work on all routers you can only save to nvram and how much you can save there varies depending on the router. You also shouldn't save there very often, I think ttraff (the traffic monitor on DD-WRT) only saves daily, so that wouldn't really fix our problem.
So yes, using a USB stick should be extremely helpful. However I do not want to make that mandatory as not everyone can use it. It is something I will probably look into though. _________________ 2xWZR-HP-G300NH(B) (B0 B0) DD-WRT v24-sp2 (06/14/11) std 17201
One antenna swapped for an RP-SMA connector and 14dB external Yagi.
http://csdprojects.co.uk/ddwrt/