Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: resolving ip's to names in a text file

by Malkavian (Friar)
on Jul 20, 2001 at 16:17 UTC ( [id://98381]=note: print w/replies, xml ) Need Help??


in reply to resolving ip's to names in a text file

Another question is, do you need to resolve the IP addresses within Perl?
If you're doing a log analysis, and need to resolve the addresses within that log, there are a veritable cornucopia of tools out there to achieve that.
One that I use, dns-terror (now called 'fastresolve') is screamingly fast, and beats every Perl solution I've yet seen.
The caveat with that, is that it loads the whole DNS cache file into memory.. I've seen it chew up most of the available memory on a logging host, and bring it to it's knees.. However, that was with millions of IP addresses in cache..
Another pre-resolver is jdresolve, which, though slower than fastresolve is extremely fast, and makes use of the ADNS Perl modules. Perhaps, downloading the source for jdresolve, and reading it, or using it as a pre-processor would help.
For doing many processes on a file, I find that it's often better to use dedicated tools as filters, and pipe the data through them. In many cases, I've gained huge performace benefits from this, along with the ability to easily add more functionality by adding an extra filter.
To achieve this while in a Perl script, the open function with the pipe from program output to script (open(HANDLE,"program|");) would work a treat, taking resolved data from the original file, and giving you a handle on it.

HTH

Malk
  • Comment on Re: resolving ip's to names in a text file

Replies are listed 'Best First'.
Re: Re: resolving ip's to names in a text file
by RayRay459 (Pilgrim) on Jul 20, 2001 at 19:51 UTC
    I don't NEED to resolve the IP address within Perl, i just thought that it might be the easiest way for me to get the job done. I will lookup "fastresolve", jdresolve" as well as hack around with the scripts that some of the guys posted below. thank you for your help. Thank you All! ~Ray~

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://98381]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-19 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found