incava.org

A command-line (console) application to summarize information from Apache logs, including hit counts, requests, referrers, and user activity.

Example Output

Hit Count

A summary of the hits this week:

% apercu --count --time=thisweek /var/log/apache2/access-2006_log
hits by time
    year      mon      day    time
    ----      ---      ---    ----
     692      692      692    2006-01-16
    1083     1083      391    2006-01-17
    1447     1447      364    2006-01-18
    1971     1971      524    2006-01-19
    2381     2381      410    2006-01-20
    2617     2617      236    2006-01-21
    2677     2677       60    2006-01-22

User Profile

The profile of a user, showing their hostname, user agent, referrer, and activities, with the format:

    [ time] [sta] resource

where "time" is time in milliseconds since their first hit, "sta" is the status of the request, and "resource" is the page requested.

% apercu --users --time=today <log file> 

    [...]

    user: somewhere.org
        agent: Opera/8.51 (Windows NT 5.1; U; en)
        ref  : -
        start: Sat Jan 21 13:30:13 EST 2006
            [    0] [200] /
            [    5] [200] /projects/
            [   32] [301] /projects/java-diff
            [   32] [304] /projects/java-diff/
            [  146] [200] /readings/
            [  157] [200] /
            [  173] [304] /projects/
            [  176] [304] /projects/diffj/
            [  184] [301] /projects/diffj
            [  199] [200] /projects/diffj/download.html
            [  208] [200] /pub/diffj/diffj-1.0.5.tar.gz
            [  229] [200] /projects/java-diff/download.html
            [  231] [200] /pub/java-diff/java-diff-1.0.3.tar.gz
            [  578] [200] /projects/apercu/
            [  581] [200] /projects/coloryze/
            [  592] [200] /projects/doctorj/
            [  604] [304] /projects/modifile/
            [  606] [200] /projects/glark/
            [  607] [200] /projects/glark/example.png

Resources

List of resources (requests):

% apercu --resources --time=today <log file> 

resources
       2 /favicon.ico
       1 /icons/back.gif
       1 /images/bg.gif
       1 /incava.css
       1 /projects/
       1 /projects/apercu/
       2 /projects/coloryze/
       1 /projects/cvsdelta
       1 /projects/cvsdelta/
       2 /projects/doctorj
       3 /projects/doctorj/
       4 /projects/glark
       2 /projects/glark/
       3 /projects/glark/download.html
       2 /projects/glark/example.png
       1 /projects/glark/feedback.html
       1 /projects/glark/glark0.png
       1 /projects/glark/glark6.png
       1 /projects/glark/or.png
       1 /projects/glark/search.png
       1 /projects/java-diff/
       1 /projects/modifile/
       1 /pub/glark/
       4 /pub/glark/glark-1.7.5.tar.gz
       2 /pub/glark/glark-1.7.6.tar.gz
       2 /pub/glark/glark-1.7.7.tar.gz
       2 /pub/glark/glark-1.7.8.tar.gz
       1 /pub/phraze/phraze-0.4.tar.gz
      10 /robots.txt
       1 /usage
       1 /usage/
       1 /usage/msfree.png
       1 /usage/usage.png

Referrers

Referrers from freshmeat this month:

% apercu --ref='.*freshmeat.net/projects\S*' --time=thismonth <log file>
referrers
      26 http://freshmeat.net/projects/java-diff/
      14 http://freshmeat.net/projects/glark/
       7 http://freshmeat.net/projects/diffj/
       6 http://freshmeat.net/projects/phraze/
       4 http://freshmeat.net/projects/cvsdelta/
       4 http://freshmeat.net/projects/modifile/
       3 http://freshmeat.net/projects/coloryze/
       2 http://unix.freshmeat.net/projects/glark/

Valid HTML 4.01!

Valid CSS!