On Wed, 28 Mar 2001, Jason Linhart wrote:
> 
> The DNS cache file is a flat sequential file, but it gets loaded into 
> memory only once, where it becomes an optimized hash table. Keeping file 
> formats simple is a big advantage, but Analog doesn't let that constrain 
> what it does internally.
> 

Jason has hit the nail on the head here.

I just want to pull a couple of other points out of this thread:

* If I've correctly understood what Sean & Jeremy are suggesting with the
DNSLOOKUP command, to preprocess the logfile with an extra helper utility
first, it already exists. It's called UNCOMPRESS.

All UNCOMPRESS does is use a named program to preprocess the logfile, and
send the standard output of that program into analog. In other words (for
Unix users),
  analog +C"UNCOMPRESS *.gz gzcat" logfile.gz
is identical to
  gzcat logfile.gz | analog -

This should already work with most DNS lookup utilities (as long as they can
write to stdout, not just to a file on disk). Then you can use that
utility's mechanisms as an alternative to analog's.

I've never previously thought of using the UNCOMPRESS command to do anything
other than decompression, but I rather like it. I'll add it to the
documentation.

* The reasons DNS lookups are slow are (i) each failed lookup has to wait
maybe up to 30 seconds for a timeout, unless DNSTIMEOUT is on; (ii) the
lookups aren't threaded because there is no platform-independent threading
code, and also because it would mess up the analog's processing sequence.

-- 
Stephen Turner               http://www.statslab.cam.ac.uk/~sret1/
  Statistical Laboratory, Wilberforce Road, Cambridge, CB3 0WB, England
  "Your account can only be used for a single internet session at any one
   time and for no more than 24 hours in any one day." (NTL terms of use)



+------------------------------------------------------------------------
|  This is the analog-help mailing list. To unsubscribe from this
|  mailing list, go to
|    http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
|  List archives are available at
|    http://www.mail-archive.com/[email protected]/
|    http://lists.isite.net/listgate/analog-help/archives/
+------------------------------------------------------------------------

Reply via email to