Apache http status

Discussion in 'Apache' started by Namesniper, Dec 12, 2006.

  1. #1
    Hi,

    When you are runing http status it gives you detailed information about processes,which files they are requesting,IPs etc but is there a way to make it sort the data 1)by files 2)by IPs and 3) by request ?
     
    Namesniper, Dec 12, 2006 IP
  2. ub3r

    ub3r Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you could just search the log files with grep.

    grep -i "123.123.123.123" access_log

    and that would only return lines that command 123.123.123.123. You could do the same for filenames:

    grep -i "filename.jpg" access_log
     
    ub3r, Dec 17, 2006 IP
  3. Namesniper

    Namesniper Well-Known Member

    Messages:
    365
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    118
    #3
    May i add an argument to those command to see results this way
    Filename.x was accesses 1000 times
    filename.x2 was accessed 900
    and so on
    I want it to sort out results by the number of times there were accessed and also separate command to see the IP which has requested most files from the server,is it possible ?
     
    Namesniper, Dec 18, 2006 IP
  4. ThreeGuineaWatch

    ThreeGuineaWatch Well-Known Member

    Messages:
    1,489
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    140
    #4
    For your IP...

    %sort access_log | cut -d " " -f 1 | uniq -c | sort -r | more

    etc.

    Er... why not use a log analyser?
     
    ThreeGuineaWatch, Dec 18, 2006 IP