From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 12:56:05 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 185F937B401 for ; Tue, 1 Apr 2003 12:56:05 -0800 (PST) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B97543FAF for ; Tue, 1 Apr 2003 12:56:04 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0085.cvx40-bradley.dialup.earthlink.net ([216.244.42.85] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 190SnS-0002jX-00; Tue, 01 Apr 2003 12:55:55 -0800 Message-ID: <3E89FC8D.90AFF0F@mindspring.com> Date: Tue, 01 Apr 2003 12:54:37 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Stalker References: <002301c2f831$d847b820$4206000a@stalker> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a489b7aca4d6e030e47bc37acd3d1d2a12387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org Subject: Re: mbuf question again 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: Tue, 01 Apr 2003 20:56:05 -0000 Stalker wrote: > I would like to know if it is possible to write a program to check which > mbuf's are allocated to which programs that are currently running, or is > this totally not possible? > > If it is possible, could someone point me in the right direction as in which > libraries / functions / reading material i would need to look at in order to > do so? The mbufs are not accounted to particular processes; our TCP/IP stack is kernel code, not user space code. 8-). If you look at the output of "netstat -aA", you will get the application data pending in so_snd and so_rcv queues. You don't get the mbufs "in progress", and you don't get the size of the freelist; you can approximate the second one with "vmstat -m", but the "in progress" numbers are simply not available, because it's more important to use the memory and CPU for actual data, rather than accounting structures. -- Terry