Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Sep 2017 15:44:22 +0200
From:      Polytropon <>
To:        RW <>
Cc:        RW via freebsd-questions <>
Subject:   Re: Help scripting dns lookup using awk
Message-ID:  <>
In-Reply-To: <>
References:  <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Fri, 15 Sep 2017 14:30:19 +0100, RW via freebsd-questions wrote:
> On Thu, 14 Sep 2017 20:55:00 -0400
> Ernie Luzar wrote:
> > The following sh script works, but runs very slow.
> Almost certainly the reason it's slow is that you are doing sequential
> synchronous lookups. Switching  to another language isn't going help
> much. To speed it up you either need to switch to a language with a
> DNS library that supports asynchronous lookups or fire-off parallel
> child processes. The latter is easier.

Correct. The bottleneck is is sequential calls to "host <parameters>".
Separating the input, for example per TLD, and then executing the
queries in parallel could help. It's also possible to use IP ranges
for separation. However, only actual testing will reveal which
approach works best. :-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

Want to link to this message? Use this URL: <>