Feed on
Posts
Comments

Monthly Archive for May, 2007

Apache Log Quick Summary

Sometimes I set up a quick site for a client and want to summarize hits without setting up awstats. So, I wrote a quick and dirty script to sum up the hits per day in Apache's access_log file.
Example:
$ cklog access_log
04-15-2007: 21
04-16-2007: 2134
04-17-2007: 304
04-18-2007: 6960
04-19-2007: 951
04-20-2007: 412
Here's the script:

require 'date'
daily = Hash.new
File.open(ARGV[0] || "access_log", "r") [...]

Read Full Post »