Humm... That's strange.. Are these libs default included in the 1.9 firmwares? Gonna check that out at home.Quote:
Originally Posted by Technik
Printable View
Humm... That's strange.. Are these libs default included in the 1.9 firmwares? Gonna check that out at home.Quote:
Originally Posted by Technik
Hi, I can get darkstat to run fine of my USB pendrive, but I can't seem to get it to run as a daemon using the --detach keyword.
Her is what it prints when i start it:
And when running ps i get this:Code:[admin@myrouter /tmp]$ ./darkstat -d /tmp/harddisk/darkstats/ -p 81 --detach
darkstat v2.6 using libpcap v2.4 (mipsel-unknown-linux-gnu)
Detaching...
[admin@myrouter /tmp]$ Firing up threads...
Sniffing on device br0, local IP is 192.168.100.1
GRAPH: Starting at 5 secs, 55 mins, 1 hrs, 20 days.
Loaded /tmp/harddisk/darkstats/darkstat.db.
ACCT: Capturing traffic...
Point your browser at http://localhost:81/ to see the stats.
Any ideas?Code:
139 admin 636 S ./darkstat -d /tmp/harddisk/darkstats/ -p 81 --detach
140 admin 636 S ./darkstat -d /tmp/harddisk/darkstats/ -p 81 --detach
141 admin 636 S ./darkstat -d /tmp/harddisk/darkstats/ -p 81 --detach
My firmware is 1.9.2.7-3b.
While I'm here I might as well ask a more general question..
I have a small network setup sharing my Internet connection with 4 neighbors. I want to be able to monitor my network a little, and specifically in two ways:
- Some network statistic over the usage of each neighbor. (What and how much)
- Some realtime information of who is on at the moment, and how much resources are they using (Ie. are they browsing, playing online or downloading (p2p))
Any ideas for the best way of accomplishing this? From this forum I have looked a bit into Iptraf and darkstat, and tried unsuccesfully to get the Graphical IP accounting running. But I am still unsure of the best way of achieving what I want, so all suggestions are welcome.. If you have a tool not mentioned above that I should try out, or if you have some suggestions of how I can use iptraf or darkstat..
Sjur
PS: Didn't need any extra libs to run darkstat.. Could just run it right of my usb pendrive..
hi pls can you help me whit which parameter in command can ai changing switch device. Default is eth0 set and that is by me WLAN i want to mi WiFi site sniffing. Thnx
use ./darkstat -i br0 or ./darkstat -i eth1 or ./darkstat -i eth2
see which one is working for you. Somebody with wl500g could confirm this.
Thnx br0 has worked ethx not.
Could somebody how exactly to compile darkstat (and libpcap)? I tried all combinations of parameters for ./configure, environment variables and Makefile editing. No matter what I did, either it didn't work at some point or they compiled for i386 and not mips.
I'm using the tools from GPL_1927 as well as the official sources of darkstat and libpcap.
Thanks a lot!
Edited: This should have been posted in another thread at first:
http://wl500g.info/showthread.php?p=13490#post13490
Original:
Since nobody answered, I solved the problem myself. I'll give some details here in case somebody wants to do something similar.
I first compiled libcap using the compile-libcap.sh on the original sources.
Then I modified darkstat to include a check in the main accounting cycle. I modified darkstat.c, darkstat.h, bignum.h, acct.c and acct.h. The result is now in darkstat-2.6.tar.gz (updated, not original sources). I used compile-darkstat.sh to cross-compile it. I had to manually insert a new line 2092 (cross_compiling=no) in the configure script, to fool the compiler not to do some impossible tests. The resulting executable darkstat is included with this post.
I added a new cmd parameter to darkstat "-limit trafficLimitInMB" which specifies the traffic volume after which the connection will be terminated (route del default). By default this limit is 3000 MB.
Next I'll try to implement a similar functionality with iptables, scripts and cron as suggested. For now I needed this as an emergency solution.
Have fun!
George
Hi i want to add darkstat to start when i restarting the asus WL500G i have a usb key. On the usb key i have the darkstat, but when i restart the Asus then i mus manualy starting darkstat. How can i do that automaticly ?
Read up on post-boot, post-mount scripts!
I.e. http://oleg.wl500g.info
S
I tried but nothing works :-( Can you one examle to add me ?
Edit location and parameters for darkstat.Code:mkdir -p /usr/local/sbin
echo "#!/bin/sh" > /usr/local/sbin/post-mount
echo "/tmp/harddisk/darkstat" >> /usr/local/sbin/post-mount
chmod +x /usr/local/sbin/post-mount
flashfs save
flashfs commit
flashfs enable
reboot
Flashfs enable can be skipped if flashfs is already enabled.
See how that works.
B.
Edit: Added chmod
I tryed it give to post-boot
Well post-boot will most likely run before harddisk is mounted. So if darkstat runs from harddisk it won't be found and can't be started. So use post-mount.
S.
hmm nothing :-(
;-) it works thnx
i needed change mod to executable