Operating System - HP-UX
1753766 Members
5567 Online
108799 Solutions
New Discussion юеВ

Re: netstat -i takes long time to respond

 
Igor Molchanov
Occasional Advisor

netstat -i takes long time to respond

After configuring second Lan adapter, I noticed that "netstat -i" takes a while - up to 30 sec - to respond. "netstat -in" works fine. /etc/nsswitch.conf set to "files dns".
9 REPLIES 9
rick jones
Honored Contributor

Re: netstat -i takes long time to respond

silly question, but you are sure that there are entries in your /etc/hosts file for the IP(s) of the new interface? if not, do you still have DNS server connectivity, and does it have PTR records and such for your IPs?
there is no rest for the wicked yet the virtuous have no pillows
Igor Molchanov
Occasional Advisor

Re: netstat -i takes long time to respond

Rich,

I do have entries in /etc/hosts for the second interface.
Alan Riggs
Honored Contributor

Re: netstat -i takes long time to respond

This is obvoiusly a name resolution issue. One of your interfaces is not present in /etc/hosts and is noit resolving quickly in DNS. Place the entry in /etc/hosts, but I would also take a close look at your DNS configuration.
Igor Molchanov
Occasional Advisor

Re: netstat -i takes long time to respond

And one more time - all the required entries exist in /etc/hosts, nsswitch.conf is set to files first. Specifics about the second interface - it is on a private network without the gateway.
Craig Gilmore
Trusted Contributor

Re: netstat -i takes long time to respond

I understand that you feel that all entries in /etc/hosts and DNS are set correctly. However, the only difference between a netstat -i and -in is the name service resolution.

I might suggest doing some name service troubleshooting. Use nslookup -swtrace and then at the > prompt type in the IP address of all interfaces on your system. Each should come right back if everything is OK and report the hostname from /etc/hosts. IF NOT, then you have identified your problem area. Be sure that you also look up 127.0.0.1 as netstat does.

Regards.
Igor Molchanov
Occasional Advisor

Re: netstat -i takes long time to respond

Craig,

Thank you for the note. I ran nslookup -swtrace as you recommended and had a quick responce with the right names for each adapter, including the loopback. netstat -i still hangs.
Alan Riggs
Honored Contributor

Re: netstat -i takes long time to respond

Well, as has been mentioned, the only difference between netstat -i and netstat -in is name resolution. 2 possible things to explore:

1) Did you run nslookup on both hostnames and IP addresses?

2) Run netstat -i -I lan?
for each interface. Try to narrow it down to the specific card which is causing the delay in reporting.
Igor Molchanov
Occasional Advisor

Re: netstat -i takes long time to respond

Alan

It hangs on the private interface adapter. nslookups works both ways no problem getting entries from FILES. Incredibly, once in a while I am getting almost instant responce from netstat -i, next time it will hang again - with no changes in configuration.

Thanks for your recommendations.
Bruce Regittko_1
Esteemed Contributor

Re: netstat -i takes long time to respond

Hi Igor,

I'm afraid that I cannot add much except to say that I have always noticed the same thing when I have dns configured. Without dns, instant response. I suspect that it is a netstat thing since netstat -r gives the same result, even when nsswitch is set to check files first. I have tried many different configurations with no change.

--Bruce
www.stratech.com/training