sockets stuck in use

Adam Vande More amvandemore at gmail.com
Tue Jul 20 03:04:25 UTC 2010


On Mon, Jul 19, 2010 at 3:12 AM, Jim <stapleton.41 at gmail.com> wrote:

> I was working on an application I've been developing, and I closed the
> last instance a bit over 12 hours ago, but some of the sockets are
> still stuck in use:
> [sjss at elrond ~/dev/pipe/scripts]$ netstat | grep -e 'tcp' | grep 9612
> tcp4       0      0 192.168.1.80.42464     192.168.1.2.9612       SYN_SENT
> tcp4       0      0 192.168.1.80.35742     192.168.1.2.9612       CLOSED
> tcp4       0      0 192.168.1.80.46116     192.168.1.2.9612       CLOSED
> tcp4       0      0 192.168.1.80.36792     192.168.1.2.9612       CLOSED
>
>
> Is there any way to get rid of them without restarting the machine? I
> was playing with sockopt SO_KEEPALIVE and SO_LINGER when I caused this
> issue..
>

sockstat(1) will tell you process that has the socket open, can you kill it
from there?

-- 
Adam Vande More


More information about the freebsd-questions mailing list