From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 31 07:29:17 2005 Return-Path: X-Original-To: hackers@freebsd.org 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 3D48516A41F for ; Wed, 31 Aug 2005 07:29:17 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55CBF43D45 for ; Wed, 31 Aug 2005 07:29:15 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail09.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j7V7T9Ak009021 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 31 Aug 2005 17:29:13 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id j7V7T9SR075431 for ; Wed, 31 Aug 2005 17:29:09 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j7V7T95m075430 for hackers@freebsd.org; Wed, 31 Aug 2005 17:29:09 +1000 (EST) (envelope-from pjeremy) Date: Wed, 31 Aug 2005 17:29:08 +1000 From: Peter Jeremy To: hackers@freebsd.org Message-ID: <20050831072908.GA73852@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i Cc: Subject: Determining where mbufs are in use X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 07:29:17 -0000 I think I have a system that is leaking mbufs and I'd like some ideas on how to track down what mbufs are in use. Background: The system is running 4.9p1 and has been up for about 8 months. I haven't noticed any problems before. This afternoon, I opened an xterm, did an slogin to another system and ran "ipfw l" on that system. The output froze about halfway through and I noticed that my system was barely responding. A check of the console showed that the system was out of mbuf clusters (1024). I killed a couple of ssh sessions and the in-use mbufs and clusters dropped to 440 but that still strikes me as excessive. My laptop shows 12 clusters in use with a maximum of 74 after a month of uptime. The system in question is my main workstation at work. It has dual heads with a virtual WM and I tend to have lots of xterms open (maybe 50-60, both local and ssh). It's an NFS client but not server. netstat showed only a couple of dozen TCP sockets, though there are a lot of Unix domain sockets (for X) - none had any data queued. Is there any easy way to work out where all the mbufs have gone? -- Peter Jeremy