From owner-freebsd-questions@FreeBSD.ORG Tue Jul 20 10:55:37 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 67591106564A for ; Tue, 20 Jul 2010 10:55:37 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id EF3C08FC12 for ; Tue, 20 Jul 2010 10:55:36 +0000 (UTC) Received: by eyh6 with SMTP id 6so1370057eyh.13 for ; Tue, 20 Jul 2010 03:55:35 -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:content-type :content-transfer-encoding; bh=bQRDZYkyk5VEqgzonshROxF4FZo7dgR47N4vjO4SM8M=; b=IM8j0vdRRwRQIpxLE8dYfj71Kw24FZzgiUgjAsXVB2yadug3lNh+UTNKuEVRRPmKxS dWp+k8lPZnuRUM9wfPyEwC8bJ1VSoBSovDHYe2XrzxxYo6fek+jicLeW/8R+nC/TIwYj 950QC3VosveZQnjYNLcHhdOsEfbwOeUeuwzhQ= 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 :content-type:content-transfer-encoding; b=qRGZMvvL7EDKfQzvI2Daa/zNfzKvGMWYDREAiMKWFRJuuWueNomYzrkIrQR2WkTacL dMzwY7UuGTT4UhWfFloQWrkVUcmT2qDIJXaaMrtXt9XahcfEOYla5QF0zvMyxtZFQv9K ndsd6ku2S+97qXCmqECF57OtjJc7l7vGtbIqg= MIME-Version: 1.0 Received: by 10.216.178.199 with SMTP id f49mr5031870wem.110.1279623335554; Tue, 20 Jul 2010 03:55:35 -0700 (PDT) Received: by 10.216.172.4 with HTTP; Tue, 20 Jul 2010 03:55:35 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Jul 2010 06:55:35 -0400 Message-ID: From: Jim To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 10:55:37 -0000 On Mon, Jul 19, 2010 at 11:04 PM, Adam Vande More w= rote: > 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 =A0 =A0 =A0 0 =A0 =A0 =A00 192.168.1.80.42464 =A0 =A0 192.168.1.2.9= 612 =A0 =A0 =A0 SYN_SENT >> tcp4 =A0 =A0 =A0 0 =A0 =A0 =A00 192.168.1.80.35742 =A0 =A0 192.168.1.2.9= 612 =A0 =A0 =A0 CLOSED >> tcp4 =A0 =A0 =A0 0 =A0 =A0 =A00 192.168.1.80.46116 =A0 =A0 192.168.1.2.9= 612 =A0 =A0 =A0 CLOSED >> tcp4 =A0 =A0 =A0 0 =A0 =A0 =A00 192.168.1.80.36792 =A0 =A0 192.168.1.2.9= 612 =A0 =A0 =A0 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 > Thanks... That told me "who" to kill