Troubleshooting with netstat

Jamie Ostrowski jamie.ostrowski at gmail.com
Tue Oct 2 13:45:25 PDT 2007


  I am having a difficult time interpreting the output of netstat, and I
wonder if anyone can help shed some light on the netstat man page and help
me interpret the results I'm getting.

  If I run netstat -al -p tcp

  I got a long list (810 entries) of network connections. 606 of these are
at TIME_WAIT status.

  Since I was getting network connections, I assumed that due to the above
output from netstat that the TIME_WAIT connections were filling my network
buffer queues. So, I tried to increase the size of the queues, and limit the
expiration time on the connections:

sysctl kern.ipc.somaxconn=1024   (was 128)

sysctl net.inet.tcp.msl=15000   (was 30000)

  The whole idea was to open up the size of the connection queue and allow
more tcp connections to come in while at the same time limiting the amount
of time they hung around so the older ones would leave the queue faster.

 Strangely, I my machine is STILL dropping approx 20% of my connections.

 How can I view the queue with netstat? What I'd like to know is how many
empty slots I have available for connections at any given point in time.
What I want to know is, as I am increasing my somaxconn, is my queue getting
bigger? If so, why are connections still being dropped?

 Strangely, when I run %netstat -L -f inet -p tcp
Current listen queue sizes (qlen/incqlen/maxqlen)
Proto Listen         Local Address
tcp4  0/0/50         localhost.domain
tcp4  0/0/50         janus.domain


More information about the freebsd-net mailing list