From owner-freebsd-questions Fri Aug 17 5:45: 2 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail4.txucom.net (mail4.txucom.net [207.70.175.17]) by hub.freebsd.org (Postfix) with SMTP id 1256037B40E for ; Fri, 17 Aug 2001 05:44:56 -0700 (PDT) (envelope-from bob@buckhorn.net) Received: (qmail 28227 invoked from network); 17 Aug 2001 12:44:55 -0000 Received: from lfkn-adsl-dhcp-net1-159.txucom.net (HELO buckhorn.net) ([207.70.145.159]) (envelope-sender ) by mail4.txucom.net (qmail-ldap-1.03) with SMTP for ; 17 Aug 2001 12:44:55 -0000 Message-ID: <3B7D11CB.3728823C@buckhorn.net> Date: Fri, 17 Aug 2001 07:44:59 -0500 From: Bob Martin X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: sthaug@nethelp.no Cc: jan@digitaldaemon.com, FreeBSD-Questions@FreeBSD.org, FreeBSD-ISP@FreeBSD.org Subject: Re: Killing TCP/IP connection. References: <3B7D02DC.546A2E50@buckhorn.net> <54706.998051003@verdi.nethelp.no> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG sthaug@nethelp.no wrote: > > > > Hi, is there a way to force and end to a TCP/IP connection that shows > > > with netstat -na ? > > > Something like kill -HUP or -kill -TERM, but then on a socket? > > > > > Use sockstat -4. It will give you the PID of the offending connection. > > Then you can kill it. > > Unfortunately, you *don't* always want to kill the process - think of > a server process handling many clients connections. You want to kill > the connection to *one* client, but not the rest. > > Steinar Haug, Nethelp consulting, sthaug@nethelp.no Since each connection gets it's own pid, this isn't a problem. You can kill a single ftp session or http session without interfering with the rest. Bob -- But in our enthusiasm, we could not resist a radical overhaul of the system, in which all of its major weaknesses have been exposed, analyzed, and replaced with new weaknesses. -- Bruce Leverett, "Register Allocation in Optimizing Compilers" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message