From owner-freebsd-net@FreeBSD.ORG Wed Aug 29 13:34:55 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3CFD16A421 for ; Wed, 29 Aug 2007 13:34:55 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.freebsd.org (Postfix) with ESMTP id 95BDC13C46E for ; Wed, 29 Aug 2007 13:34:55 +0000 (UTC) (envelope-from is@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id F33596895; Wed, 29 Aug 2007 17:34:53 +0400 (MSD) Received: from localhost (is1.park.rambler.ru [81.19.64.121]) by relay0.rambler.ru (Postfix) with ESMTP id D0F8C688F; Wed, 29 Aug 2007 17:34:53 +0400 (MSD) Date: Wed, 29 Aug 2007 17:34:44 +0400 From: Igor Sysoev To: d@delphij.net Message-ID: <20070829133444.GH80424@rambler-co.ru> References: <46D516D9.4050007@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <46D516D9.4050007@delphij.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-net , Robert Watson , hshh Subject: Re: Add socket related statistics to netstat(1)? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Aug 2007 13:34:56 -0000 On Wed, Aug 29, 2007 at 02:48:57PM +0800, LI Xin wrote: > Here is a proof-of-concept patch that adds sockets related statistics to > netstat(1)'s -m option, which could make SA's life easier. Inspired by > a local user's suggestion. > > Comments? I think socket info should be groupped together: 2407/1058/3465 mbufs in use (current/cache/total) 1117/797/1914/98304 mbuf clusters in use (current/cache/total/max) 1117/90 mbuf+clusters out of packet secondary zone in use (current/cache) 761/417/1178/0 4k (page size) jumbo clusters in use (current/cache/total/max) 0/0/0/0 9k jumbo clusters in use (current/cache/total/max) 0/0/0/0 16k jumbo clusters in use (current/cache/total/max) 5879K/3526K/9406K bytes allocated to network (current/cache/total) 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters) 0/0/0 requests for jumbo clusters denied (4k/9k/16k) 15333/15537/30870/204800 socket UMA in use (current/cache/total/max) 5929K bytes allocated to socket 0 request for socket UMA denied 104/264/6656 sfbufs in use (current/peak/max) 0 requests for sfbufs denied 0 requests for sfbufs delayed 135834 requests for I/O initiated by sendfile 0 calls to protocol drain routines Second, I think socket memory calculation should include tcpcb, udpcb, inpcb, unpcb and probably tcptw items. -- Igor Sysoev http://sysoev.ru/en/