• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

COPYINGH A D04-Jul-200217.6 KiB341281

ChangeLogH A D04-Jul-2002342 116

INSTALLH A D04-Jul-2002339 1710

READMEH A D04-Jul-20021.6 KiB4429

configureH A D03-May-20221.7 KiB130101

splitwrH A D04-Jul-2002600 4122

splitwr.1H A D04-Jul-200222 21

webresolve.1H A D04-Jul-2002884 3223

webresolve.cH A D03-May-20222.3 KiB10369

README

1
2Ulric Eriksson <ulric@siag.nu>
3
4This program is used in conjunction with Webalizer to get host names
5rather than IP addresses in the statistics. Preprocess the log
6files with webresolve to replace IP addresses with host names.
7The program reads from stdin and writes to stdout:
8
9	webresolve < access_log > access_log.resolved
10
11
12I wrote the program to process access log files from Apache before
13they are analyzed by Webalizer. Recent versions of Webalizer has
14semi-working resolution built in, but not on all platforms, including
15the one siag.nu runs on.
16
17Each line is one record consisting of whitespace-separated fields.
18If the first field starts with a digit, we assume that it is an
19IP address which we try to look up. The rest of the line is ignored.
20The result of the lookup is cached and the line written back with
21the first field replaced by the host name, if lookup was successful.
22
23This program is pretty slow. Thanks to the caching, repeated visits
24from the same address will only result in one lookup. Therefore
25large files will be processed proportionally faster than small ones.
26
27
28The load from this program is very light, because it spends most of
29its time waiting for the resolver. This also means that large files
30can take quite some time to process. The solution is to split the
31log file and run several resolution processes in parallel. This is
32done by the script splitwr:
33
34	splitwr logfile > logfile.resolved
35	webalizer logfile.resolved
36	rm logfile.resolved
37
38By default, splitwr runs 20 parallel resolution processes. The number
39can be changed by editing the script.
40
41
42See INSTALL for installation instructions.
43
44