Analyze Apache Web Log Statistics starting on DATE x

sed -n '/05\/Dec\/2010/,$ p' access.log | goaccess -s -b
GoAccess is an open source real-time Apache web log analyzer and interactive viewer that runs in a terminal in *nix systems. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly. http://goaccess.prosoftcorp.com/
Sample Output
  Total Requests  1171190   Unique Visitors 39270     Referrers  3314      Log N/A
  Failed Requests 0         Unique Files    11026     Unique 404 5995      BW  8.07 GB
  Generation Time 4         Static Files    6451      STDIN

  3086    5.79%   10/Dec/2010  167.86 MB  ||||||||||||||||||||
  7025    10.87%  09/Dec/2010  423.59 MB  ||||||||||||||||||||||||||||||||||||||
  7040    11.10%  08/Dec/2010  361.30 MB  |||||||||||||||||||||||||||||||||||||||
  7044    11.16%  07/Dec/2010  451.15 MB  |||||||||||||||||||||||||||||||||||||||
  8044    12.66%  06/Dec/2010  220.41 MB  ||||||||||||||||||||||||||||||||||||||||||||
  7031    10.96%  05/Dec/2010  317.27 MB  ||||||||||||||||||||||||||||||||||||||

0
By: allinurl
2010-12-13 17:37:33

These Might Interest You

  • Analyze an Apache access log for the time period with most activity and display the hit count, requesting IP and the timestamp. May help detect a brute force dos attack.


    2
    cut -d " " -f1,4 access_log | sort | uniq -c | sort -rn | head
    zlemini · 2013-09-20 21:29:32 0
  • See man vmstat for information about the statistics. This does the same thing without the timestamp: vmstat 5 Show Sample Output


    3
    while [ 1 ]; do echo -n "`date +%F_%T`" ; vmstat 1 2 | tail -1 ; sleep 4; done
    plasticboy · 2009-03-26 19:16:55 0
  • GoAccess is an open source real-time Apache web log analyzer and interactive viewer that runs in a terminal in *nix systems. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly. http://goaccess.prosoftcorp.com/ Show Sample Output


    1
    goaccess -f /var/log/apache2/access.log -s -b
    allinurl · 2010-10-25 20:03:18 1

  • 1
    grep "10/Sep/2013" access.log| cut -d[ -f2 | cut -d] -f1 | awk -F: '{print $2":"$3}' | sort -nk1 -nk2 | uniq -c | awk '{ if ($1 > 10) print $0}'
    bormarek · 2013-09-12 08:45:38 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: