httplog.c
(c) Armin Obersteiner
Parsing ncsa/cern httpd logfile
USAGE: httplog [-s <keyword>] [-l] <logfile>
<logfile> - httpd <logfile>
-l - long: country statistics
-lt - long: time statistics
-s <keyword> - search for <keyword>
compiles on: MaxonC++ (amiga)
gcc (amiga)
gcc (bsd)
(it should actually compile on any platform then :)
->>> gcc -o httplog httplog.c -lm
it´s made to work on ncsa logfiles:
Site [Weekday Month Day Hours(24):Min:Sec Year] Method URL Protocol
and cern logfiles:
Site - - [Day/Month/Year:Hours(24):Min:Sec +GMT_Hours] "Method URL Protocol" #1 #2
to include new countries:
- add lines to structure "struct dummy c"
- don´t forget to increase "country_anz"
to adapt time and date for other logfile formats:
- do the same with "struct dummy d" / "struct dummy t"
- don´t forget to increase/decrease "day_anz" :) / "time_anz"
the second entry in these stuctures (dummy) is the string to search for
(use spaces or brackets, because it´s more reliable then)
the third entry is the string for output
CU Armin :)
( Armin.Obersteiner@giga.or.at )
|