Console Web Log Analyzer
For those who want to analyze their Common Log Format web logs without having to use web based graphical tools such as awstats. This is a simple console based web log analyzer. Output is somewhat in markdown so you can also use this to generate pages, with cron or whatever.
Requires python 2.7 and numpy
-l: log file to analyze. Defaults to ./access_log
-x: perform reverse DNS lookup on IP addresses
-C: show all unique visitors in output
-c x: show 'x' top accessing visitors
-R: show all unique accessed resources -r y: show 'y' top accessed resources
-b z: Use maximum of 'z' x characters in the bar charts (adjust if default overruns a line)
-v: show version information and exit
Note: Using -x with -C will be slow if you have a big log file.
% ./weblog.py -l access_log
Simply parse a log file and output to the terminal
$ ./weblog.py -xl access_log > out.md
$ discount-mkd2html out.md
Running these two commands will create the HTML file out.html in the running directory.
The output, if translated to HTML from Markdown, would look better if Markdown supported tables.
Does it do IPv6 the right way?