Solved

How to repeatedly test DNS lookup in a loop

Posted on 2014-04-14
2
975 Views
Last Modified: 2014-04-14
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
Comment
Question by:Anthony Lucia
2 Comments
 
LVL 10

Expert Comment

by:Rafael
ID: 40000288
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
 
LVL 37

Accepted Solution

by:
Gerwin Jansen earned 500 total points
ID: 40000294
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now