juretta.com

Awk, sed, Apache Logfiles

October 18, 2005
Tags: Apache awk Dropbox sed

1) Zeitraum Logfiles

bash-2.03$ head -1 de-static_access.log; tail -1 de-static_access.log 193.168.0.4 - - [31/Aug/2005:17:21:27 +0200] "GET / HTTP/1.0" 200 5276 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)" 84.157.84.69 - - [18/Oct/2005:12:51:46 +0200] "GET /downloads/wallpaper_3_1.jpg HTTP/1.1" 200 69189 "http://www.example.com/p_guestbook.php?id=44576" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"
-> also 31.08.2005 -> 18.10.2005

2) Pageviews (Alle Seitenabrufe ohne Images/Flash etc.)

bash-2.03$ egrep -vc '(\.gif |\.jpg |\.png |\.swf |\.ico)' de-static_access.log
-> 42449

3) Unique Visitors

(Unterschiedliche IP-Adressen über den gesamten Zeitraum; unabhängig vom Zeitpunkt des Abrufs)
bash-2.03$ awk {'print $1'} de-static_access.log | sort | uniq | wc -l
-> 3479

AWStat

bash-2.03$ perl awstats.pl -output=pagetype -config=my_name_config
[1]: http://awstats.sourceforge.net/docs/awstats_setup.html

About

This is the defunct blog of Stefan Saasen.