Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: .log to .csv conversion

From: ryan:christiansen:intellisol at: 15-Mar-2001 15:59

I did try this, but ran into some problems. Here is the code I was using... DNS-library: load %dns-library.r foreach entry DNS-library [ either find/any entry/2/1 IP-address [ domain-address: entry/2/2 ][ domain-address: read join dns:// IP-address new-entry: make block! (rejoin [{DNS ["} IP-address {" "} domain-address {"]} ]) append/only DNS-library new-entry save %dns-library.r copy/deep DNS-library ] ] Here is (an example of) the contents of the %dns-library.r file [ DNS ["" "sub.domain.dom"] ] The above code would not find IP matches and instead would just keep appending the same DNS entries to the library over-and-over.
>make (and save) a hash of ip -> domain-name >and only do the dns lookup once per ip >> Below I am sharing a script that will parse CLF Apache web.log files and >> place the data into Excel-friendly .csv files. >> >> I do have a question, however: the script takes a LONG time to run
>> of all of the DNS lookups. Is there any way to speed this up?
Ryan C. Christiansen Web Developer Intellisol International 4733 Amber Valley Parkway Fargo, ND 58104 701-235-3390 ext. 6671 FAX: 701-235-9940 Global Leader in People Performance Software _____________________________________ Confidentiality Notice This message may contain privileged and confidential information. If you think, for any reason, that this message may have been addressed to you in error, you must not disseminate, copy or take any action in reliance on it, and we would ask you to notify us immediately by return email to [ryan--christiansen--intellisol--com]