Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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

by Malkavian (Friar)
on Jul 20, 2001 at 16:17 UTC ( #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.


  • 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?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2020-04-06 02:26 GMT
Find Nodes?
    Voting Booth?
    The most amusing oxymoron is:

    Results (36 votes). Check out past polls.