• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1536
  • Last Modified:

How to repeatedly test DNS lookup in a loop

I suspect an application is running slowly because its doing a DNS lookup repeatedly, and the hosts file may be in error

There are complications on why I can not quickly debug this

So my question is:  is there a simple test that would perform a DNS look up repeatedly (cant use ping, but can use host)

Could someone please post a quick script or something like taht

Thanks  

btw, running suse
0
Anthony Lucia
Asked:
Anthony Lucia
1 Solution
 
RafaelCommented:
Not sure of the servers you're looking up so here is something that I use to help me write quick scripts.

http://www.compileonline.com/execute_bash_online.php
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
You mean just running nslookup's from a script?

Like this maybe:

num=0
while [ ${num} -lt 100 ]
do
  nslookup host
  sleep 1
done;

The above will do 100 host lookups.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now