Why my netstat command is slow in Linux
In Category Linux Networking
Basically default usage of netstat command makes netstat command to resolve all IP addresses to display symbolic host names. If your connection to DNS server is slow or not working, netstat command spends some time in waiting for response from the DNS server. However DNS resolution of each entry in the route table itself makes it slower.
To avoid this, you can use “-n” option which disables resolution of symbolic host names from numerical IP addresses and gives prompt response with numerical IP addresses.
[neo@techpulp ~]# netstat -nr
Similar problem is seen with “arp” command as well. Just use “-n” option in this case as well to avoid DNS resolution. So you can use “arp -an” command instaed of “arp -a“.
Recent Comments