Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jul 1995 22:56:19 +0800 (WST)
From:      Peter Wemm <peter@haywire.DIALix.COM>
To:        hackers@freebsd.org
Subject:   timeouts on 'netstat' for address->name lookups?
Message-ID:  <Pine.SV4.3.91.950720224916.22006K-100000@haywire.DIALix.COM>

next in thread | raw e-mail | index | archive | help
When doing a 'netstat' or 'netstat -r', sometimes you can get 75 second 
timeouts on strange addresses that are not correctly configured in the 
dns (such as lame delegations).

'w' was recently changed so that it only spends up to two seconds trying 
to translate the address in the ut_host field into a name. 

Who would object to me doing the same to netstat?

Even though it's a short timeout, the name server will continue to 
attempt to look up the name on your behalf.  If it has trouble, and takes 
10 or 20 seconds to resolve the name it will cache it. Subsequently running 
netstat again will show the real name, rather than the IP address.

I ask, rather than 'just doing it', because it causes a small diversion 
from traditional behavior.  I think it's useful.  I like to see 
hostnames, but dont like 75 second timeouts.  Using the -n switch looses 
all hostnames, and the port names, whereas this timeout will tell you 
what is available.

Objections?  It's 4 lines of code to add.  

-Peter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.91.950720224916.22006K-100000>