From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 18 08:03:14 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C674816A4B3 for ; Thu, 18 Sep 2003 08:03:14 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1875843FB1 for ; Thu, 18 Sep 2003 08:03:14 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h8IF3Bii059730; Thu, 18 Sep 2003 10:03:11 -0500 (CDT) (envelope-from dan) Date: Thu, 18 Sep 2003 10:03:11 -0500 From: Dan Nelson To: Terry Lambert Message-ID: <20030918150311.GG51544@dan.emsphone.com> References: <3F6975BD.14CD05EE@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F6975BD.14CD05EE@mindspring.com> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i cc: "freebsd-hackers@FreeBSD. ORG" Subject: Re: TCP information X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2003 15:03:14 -0000 In the last episode (Sep 18), Terry Lambert said: > Deepak Jain wrote: > > Is there a utility/hack/patch that would allow a diligent sysadmin > > to obtain which specific TCP connections are generating retransmits > > and receiving packet drops? netstat will show me drops on an > > interface, but not on a specific source/dest pair? > > These types of statistics aren't kept. > > They usually do not make it into commercial product distributions for > performance reasons, and because every byte added to a tcpcb > structure is one byte less that can be used for something else. In > practice, adding 134 bytes of statistics to a tcpcb would double its > size and halve the number of simultaneous connections you would be > able to support with the same amount of RAM in a given machine (as > one example), if all of that memory had to come out of the same > space, all other things being equal. tcpcb is currently 236 bytes though, and I don't imagine adding another 8 bytes for an unsigned long "dropped packets" counter is going to kill him. Deepak: if you really want stats, try adding a struct tcpstat to tcpcb and hack all the netinet/tcp* code to update those whenever the global tcpstat gets updated. You'll get all the info that netstat -s prints, for each socket. *That* will definitely double the size of struct tcpcb :) -- Dan Nelson dnelson@allantgroup.com