Operating System - Linux
1827293 Members
3295 Online
109717 Solutions
New Discussion

netstat command very slow

 
Harvey Garner
Occasional Contributor

netstat command very slow

We have a HP-UX 11.11 machine that if getting read fail stream socket errors. I attempting to debug the situation I have found that the netstat command runs very slow produces two lines of output every 30 secs or so. The machine is only running at @ 20% CPU. None of the NIC cards appear to be overloaded. No maintenace has been applied in at least 6 months. Do you have any idea what would cause netstat to run so slow. I believe that this is related to the failure of the third party product getting the read fail stream socket errors. It socondary attempts to connect are tried the product will connect. The machine is booted every sunday, so leftover socket connections, garbage memory etc are cleaned up each week.

If you wait long enough the netstat does complete. So it's not really hanging just running extremely slow.
3 REPLIES 3
IT_2007
Honored Contributor

Re: netstat command very slow

Check your network settings.

lanadmin -x 0

"0" if you are hooked up with lan0 otherwise use appropriate lan ID no.

if it is set with 100HD auto on then change it to 100FD auto off.

lanadmin -X 100FD 0

which will force lan0 to 100FD auto off. Your network switch port also should set to 100FD auto off otherwise these changes won't work.
Marcel Boogert_1
Trusted Contributor

Re: netstat command very slow

Hi,

Are you using any arguments with your netstat command? Try using netstat -in and see how fast this will reply.

Regards, MB.
A. Clay Stephenson
Acclaimed Contributor

Re: netstat command very slow

The real problem may be hostname resolution. Try a "netstat -n" so that no ip address to hostname translation is done.
If it ain't broke, I can fix that.