Troubleshooting with netstat



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
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: what does backlog parameter to listen do?
    ... > length the queue of pending connections may grow to." ... > there still can be hundreds of connections established even though I ... Do you mean ESTABLISHED state from netstat output? ... Current listen queue sizes ...
    (comp.os.linux.development.apps)
  • Re: accf_http and incqlen
    ... David Malone wrote: ... always see a full queue in netstat once the machine had been running ... check that once I exceded the backlog that previous connections ...
    (freebsd-stable)
  • Re: [take25 1/6] kevent: Description.
    ... To ensure every connection is handled as quickly as possible you stuff them all in the same queue and then have all threads use this one queue. ... In nscd, for instance, we have one single thread waiting for incoming connections and it then has to wake up a worker thread to handle the processing. ... With the new event handling this wouldn't be the case, one thread only is woken and we don't have to wake worker threads. ... I think I already gave my opinion on a ring buffer, ...
    (Linux-Kernel)
  • netstat issue on Tru64. Kernel bug?
    ... I have noticed that many people were faced to the "netstat hangs" ... If a process writes in a message queue in such way that it overflows ... bash$ overflowQ ...
    (comp.unix.tru64)
  • How reliable is netstat?
    ... this diagnostic information is the output from "netstat -an". ... web server, on a high, unprivileged port, and the destination address ... my firewall was correctly blocking these connections. ... None of these remote IP addresses appear in any of my server logs. ...
    (comp.os.linux.networking)