Date: Mon, 28 Jul 1997 09:45:42 +0100 From: nik@iii.co.uk To: "Jeffrey J. Mountin" <sysop@mixcom.com> Cc: Jim Shankland <jas@flyingfox.com>, freebsd-isp@FreeBSD.ORG Subject: Re: analog and Apache? Message-ID: <19970728094542.49091@iii.co.uk> In-Reply-To: <3.0.3.32.19970725221756.00c885a4@mixcom.com>; from Jeffrey J. Mountin on Fri, Jul 25, 1997 at 10:17:56PM -0500 References: <199707251802.LAA15819@biggusdiskus.flyingfox.com> <3.0.3.32.19970725221756.00c885a4@mixcom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 25, 1997 at 10:17:56PM -0500, Jeffrey J. Mountin wrote: [Reverse IP mapping when analysing log files] > Uh, you may not want to do this. > > I found that after 4 weeks of running IP logging and using the results from > 3 servers that 5 hours to run reports vs 5 minutes was just a bit too much. I've got 10 lines of Perl (well, maybe a few more than 10 lines) kicking around here somewhere that #!/bin/pseudo-code Read in saved cache of IP addresses While (read a line from STDIN) Check it's in Common Log Format If (the host entry is an IP address) Look up the IP address Open the file yyyy/mm/dd.log (based on the date/time of the entry) Write the line to this file Wend Dump IP address cache to file Although it's slightly more sophisticated than that. I've found this makes log management that much easier, and means you only do the IP address look up once. Copies available on request. Or if I get enough requests, I'll put it up for FTP somewhere. N -- --+==[ Nik Clayton is Just Another Perl Hacker at Interactive Investor ]==+-- Pithy quotes suck.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970728094542.49091>