Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: how to set up IPTRAF on Asus

  1. #1
    Join Date
    Jun 2004
    Location
    Delft, The Netherlands
    Posts
    62

    how to set up IPTRAF on Asus

    IPTRAF (see iptraf) allows for monitoring traffic interactively. A few settings and a number of directories need to be set up in order to have it work on the ASUS:
    Download mipsel iptraf package at distro.tar

    mirrored @ chupa.nl download it here:
    http://files.wl500g.info/asus/wl500g...sel-iptraf.tar

    Currently I boot system from USB and have the / filesystem mounted as rw, so I am flexibel in putting extra files within the original file structure. When you do not want that, use a USB fs to run programs from (/mnt/usbfs)

    copy /etc/terminfo directory to root /etc/terminfo of asus
    make the following dirs:

    /tmp/var/log/iptraf
    /tmp/var/run/iptraf
    /tmp/var/local/iptraf

    to store logging, locking and config files.

    When files ar becoming large, make symbolic links to dirs on usb stick.

    Create following environment variables:

    TERMINFO = "/etc/terminfo" (or equivalent dir on /mnt/usbfs)
    TERM="linux"

    You can run iptraf interactively or in the backgorund (e.g. iptraf -d eth1 -B). Output can be shown using cgi-bin script of busybox_httpd deamon: e.g.

    Code:
    #!/bin/sh 
    echo "Content-type: text/html"
    echo ""
    echo "<html>"
    echo "<title>IPTRAF output</title>"
    echo "<body bgcolor="#5555aa">"
    echo "<h1>iptraf output</h1>"
    echo "<pre>"
    cat /tmp/var/log/iptraf/iface_stats_detailed-eth1.log
    echo "</pre>"
    echo "</html>"
    Last edited by Antiloop; 25-07-2004 at 23:37. Reason: Technik: Just corrected link to distro.tar ;) Antiloop: added mirror

  2. #2
    Join Date
    Jul 2004
    Location
    Venlo @ The Netherlands
    Posts
    21
    Doesn't work for me everything seems to be fine, but I get this:

    Code:
    /mnt/usbfs/distro # ./iptraf
    Error opening terminal: linux.
    I've set the variables and confirmed it with set.
    I'm only not sure if the tmp dir is writable but I guess it is because i've created the directory's.

    If I execute /mnt/usbfs/distro # ./iptraf -d eth1 -B, there is no output at the prompt (seems ok to me because it should be running in the background). Checking if it's running in the background with ps won't give the service in the list so it's NOT running in the background. Someone who can tell me what's wrong???. I'm using firmware release 1.7.5.9-3. Who can help me???

  3. #3
    Join Date
    Jun 2004
    Location
    Delft, The Netherlands
    Posts
    62
    Seems that you still have the envornment variables not set properly. I used the export statement to set them, i.e., export TERMINFPO="/etc/terminfo" (inclusive the quotes). If set in a script file, include the call to iptraf within the script, otherwise the envirmonment variables will not be set.
    The background option won't work when the /tmp/ directories used for logging and locking are not accessable by iptraf. Check write rights of the directrories. OS version should not be a problem.
    good luck

  4. #4
    Join Date
    Jul 2004
    Location
    Venlo @ The Netherlands
    Posts
    21
    Quote Originally Posted by sodb
    Seems that you still have the envornment variables not set properly. I used the export statement to set them, i.e., export TERMINFPO="/etc/terminfo" (inclusive the quotes). If set in a script file, include the call to iptraf within the script, otherwise the envirmonment variables will not be set.
    The background option won't work when the /tmp/ directories used for logging and locking are not accessable by iptraf. Check write rights of the directrories. OS version should not be a problem.
    good luck
    Ok i've made the temp dir's writable (silly me) and I've set the var's with the export command (i used just terminfo="/mnt/usbfs/distro/etc/terminfo" before) and it seems to work. The only problem I now have is the webserver started with "busybox_httpd -p 81" doesn't execute asp pages, it just displays them as html sites.

  5. #5
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,307
    Quote Originally Posted by kfaessen
    The only problem I now have is the webserver started with "busybox_httpd -p 81" doesn't execute asp pages, it just displays them as html sites.
    Executing the cgi-bin script needs a special directory, see the following post for more info: http://wl500g.info/showpost.php?p=4377&postcount=17

  6. #6
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,307
    I've setup iptraf successfully, but I'm having a problem with the logfiles:
    Iptraf appends its traffic info to its logfile. Because of that the logfile keeps growing and ultimately the WL-500g will run out of RAM. To counter this problem the logfile has to be removed once in a while.

    To delete the logfile one has to do the next steps:
    1) rename the logfile
    2) signal USR1 to iptraf to release the logfile
    3) delete the renamed logfile
    Iptraf will create a new logfile now.

    My question is: how can I send USR 1 to iptraf with the kill command to iptraf?
    I assume I have to do some sort of grep on ps somehow, but I can't figure that out (I'm not that experienced in Linux).

  7. #7
    Quote Originally Posted by Styno
    My question is: how can I send USR 1 to iptraf with the kill command to iptraf?
    I assume I have to do some sort of grep on ps somehow, but I can't figure that out (I'm not that experienced in Linux).
    The Asus firmware has the 'killall' command which allows you to send a signal to processes by name, so you can use:

    killall -USR1 iptraf

    --
    Miki

  8. #8

    IPTraf on another Linux minidistribution based on RedHat

    Pls a i am very sad , but i have also problem with running IPtraf on backround.
    I tried set TERM and TERMINFO but i get the message : Your term variable is not set.

    Pls, pls if exist somebody, who tell me step by step, what i have try.

    Tks a lot

  9. #9
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,307
    place these line in the shell script which starts iptraf:
    Code:
    export TERM="linux"
    export TERMINFO="/mnt/usbfs/iptraf/etc/terminfo"

  10. #10
    Join Date
    Jun 2004
    Location
    Delft, The Netherlands
    Posts
    62

    iptraf start script

    I installed iptraf in /mnt/usbfs/iptraf directory. Then I use the following script to activate iptraf:

    start_iptraf
    Code:
    mkdir /tmp/var
    mkdir /tmp/var/log
    mkdir /tmp/var/run
    mkdir /tmp/var/local
    mkdir /tmp/var/log/iptraf
    mkdir /tmp/var/run/iptraf
    mkdir /tmp/var/local/iptraf
    export TERMINFO="/mnt/usbfs/iptraf/etc/terminfo"
    export TERM="linux"
    ./iptraf $1 $2 $3
    Hope that works for you. The directories are needed for filtering, logging and keeiping track of run processes.

  11. Unhappy

    hi i want to try iptraf, but icant install the iptraf.tar file. Can somebody help me?? I have tryed "tar -xvf iptraf.tar" but "tar: Invalid tar magic"

  12. #12
    Join Date
    Dec 2004
    Location
    Skopje, Macedonia
    Posts
    13
    hi i want to try iptraf, but icant install the iptraf.tar file. Can somebody help me?? I have tryed "tar -xvf iptraf.tar" but "tar: Invalid tar magic"
    Maybe the file is corrupted. The command is correct. Try redownloading the mirrored file from chupa.
    "What's the color of a chameleon put onto a mirror?" - Stewart Brand.

  13. #13
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,307
    Maybe you need a full tar (not the tar on WL-500g) of a normal Linux distribution. Or untar with Winzip or 7z....

  14. #14
    you are on topic 666, so that's why it's not working

    You can try to use a winzip or winrar to get the iptraf executable. It should deal with the compression format.

    Otherwise, it mean your file is corrupted. You'll have to redownload it.

    Try a file iptraf.tar on a linux box. It will tell you what format you really have

  15. #15
    it's

    tar xvf distro.tar (z = gunzip uncompress)

    isn't export TERM="linux" broken? (doesn't find the linux term)i

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 06-10-2006, 07:20
  2. Asus laptop + Asus WL500G Deluxe
    By lief1981 in forum Dutch Discussion - Nederlands
    Replies: 9
    Last Post: 25-06-2005, 12:55
  3. Asus neemt www.chupa.nl als verwijzing op in Asus World
    By Antiloop in forum Dutch Discussion - Nederlands
    Replies: 4
    Last Post: 15-06-2005, 07:52
  4. Asus WL-159g (ASUS ZD1211 802.11b+g Wireless LAN)
    By Antiloop in forum WL-100g/WL-100gDeluxe/WL-103b/WL-120b/WL-120g [Broadcom Chipset]
    Replies: 0
    Last Post: 16-02-2005, 01:08

Posting Permissions

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