Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30

Thread: Compiled some tools for x-mas!

  1. #16
    Quote Originally Posted by Technik
    A nice utilities. Thanks a lot! I have tested it under 1.7.5.6-2 and 1.7.5.6-5 firmwares. Everything is working fine. These libraries needs to be copied to /LIB folder:
    libpthread.so.0
    libnsl.so.0
    Humm... That's strange.. Are these libs default included in the 1.9 firmwares? Gonna check that out at home.

  2. #17

    Cannot run as daemon (--detach)

    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:
    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.
    And when running ps i get this:
    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
    Any ideas?
    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..

  3. Question chaning snifing device

    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

  4. #19
    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.

  5. Thnx br0 has worked ethx not.

  6. #21
    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!

  7. #22
    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
    Attached Files Attached Files
    Last edited by gbrancovici; 09-04-2005 at 14:24.

  8. help

    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 ?

  9. #24
    Read up on post-boot, post-mount scripts!
    I.e. http://oleg.wl500g.info

    S

  10. I tried but nothing works :-( Can you one examle to add me ?

  11. #26
    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
    Edit location and parameters for darkstat.
    Flashfs enable can be skipped if flashfs is already enabled.

    See how that works.

    B.
    Edit: Added chmod
    Last edited by barsju; 22-05-2005 at 11:20.

  12. I tryed it give to post-boot

  13. #28
    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.

  14. hmm nothing :-(

  15. ;-) it works thnx
    i needed change mod to executable

Page 2 of 2 FirstFirst 12

Similar Threads

  1. no /dev/discs on own compiled 1.9.2.7-4
    By Jean-Fabrice in forum WL-HDD Custom Development
    Replies: 13
    Last Post: 22-10-2006, 16:49
  2. compiled 1950
    By alien433 in forum WL-500g Q&A
    Replies: 0
    Last Post: 23-09-2005, 22:00
  3. Need this compiled properly.
    By Mr.EoniX in forum WL-500g Custom Development
    Replies: 2
    Last Post: 04-09-2005, 08:08
  4. wireless-tools?
    By kolla in forum WL-HDD Custom Development
    Replies: 3
    Last Post: 23-06-2005, 14:18
  5. Some packages I compiled
    By Jean-Fabrice in forum WL-500g Custom Development
    Replies: 7
    Last Post: 23-03-2005, 12:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •