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
Anthony LuciaAsked:
Who is Participating?
 
Gerwin Jansen, EE MVEConnect With a Mentor Topic 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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.