Tuesday, June 12, 2012

netstat -a hang ....

When I try to run netstat -a on v490 - Solaris 10, 
command not back on prompt its look like hang ... I 
don't know what is the reason or cause of this 
behavior ... 

# netstat -a 
<after some output - output hange> 

It is probably trying to look up all the IP addresses it sees in DNS, and 
one (or more) of the addresses doesn't resolve. Try "netstat -an". The "-n" 
mean to not resolve the names and should run faster. 
In my case there was a problem with NIS client, so when I ran netstat -a command, it was trying to obtain hostnames via NIS (depends on nsswitch.conf), what didn't work. 

When I restart NIS client, so ypwhich is working, netstat is working too.
That's why many people use the '-n' flag on netstat as well. It disables 
name resolution, so it runs faster and uses less resourced. E.g. try 
"netstat -an" 


Post a Comment

Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM