From owner-freebsd-questions@FreeBSD.ORG Tue Jul 20 03:04:25 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC586106566B for ; Tue, 20 Jul 2010 03:04:25 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4068FC0A for ; Tue, 20 Jul 2010 03:04:24 +0000 (UTC) Received: by vws19 with SMTP id 19so6839356vws.13 for ; Mon, 19 Jul 2010 20:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=9ByP1sD0u/HSIAI+IE8sDgZsGh6leDfeDuhjdNeO/+Y=; b=qcSJSiBqf/s5HacydDb8VAkjFpzo3Wg49/WJeVzJkTy8jj4t2ITudr0FkbkD+DVsDE 7nC8nldKdYzmmPfWzQwxMNCFFUvSH2otA7r90lmw7KfmUg8iPQH8nAh7XUlCCzB/AHAp 01R4H5CFRGC/esVV6ks7n621YBRvLY2IUyezA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kZFn4OPotFi4Iowev6kXKpt6mZchrcP9d5b1PomM6td0PfKMIJXg7qHOJKNXCQ4eOO E2wMaz/7zH2CZTcinOdKc660hD6zs5r8JV5zKQqB8lC4LshJXoKaWrmhF2DF2Bal1cD8 XdBwGTuRNVTDkgfSqodFuF4pwLGTyKQjhYtPI= MIME-Version: 1.0 Received: by 10.224.35.218 with SMTP id q26mr5064601qad.36.1279595064165; Mon, 19 Jul 2010 20:04:24 -0700 (PDT) Received: by 10.229.29.71 with HTTP; Mon, 19 Jul 2010 20:04:24 -0700 (PDT) In-Reply-To: References: Date: Mon, 19 Jul 2010 22:04:24 -0500 Message-ID: From: Adam Vande More To: Jim Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: sockets stuck in use X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 03:04:25 -0000 On Mon, Jul 19, 2010 at 3:12 AM, Jim 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@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