System Resolver Test App?

Barry Margolin barmar at
Thu Nov 12 00:44:05 UTC 2009

In article <mailman.961.1257980410.14796.bind-users at>,
 "david at" <david at> wrote:

> All, 
> It has been a long day so please excuse me if I am over looking something
> trivial. I am wondering if anyone knows of an app similar to nslookup or
> dig that actually uses the system resolver. I spent a decent amount of time
> this morning trouble shooting an issue where a third invalid nameserver
> entry within the /etc/resolv.conf (CentOS) cause me much grief. My trusty
> tools nslookup & dig failed me because they worked as expected while the
> system resolver did not. I am basically trying to uinderstand why the
> system resolver was getting stuck on the third entry within the resolv.conf
> while it should have tried one of the first two working DNS servers first. 

I'm not sure if there is one, but it should be pretty easy to write a 
program that calls res_query().

But it doesn't seem like this would be much help in troubleshooting, 
because when it gets an error you won't be able to tell why.  There's no 
way for it to indicate that the error is because it was stuck on the 
third server.

Barry Margolin, barmar at
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***

More information about the bind-users mailing list