From owner-cvs-src@FreeBSD.ORG Thu Jul 28 19:54:55 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3AD416A41F; Thu, 28 Jul 2005 19:54:55 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B845E43D45; Thu, 28 Jul 2005 19:54:55 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j6SJst7Q077922; Thu, 28 Jul 2005 19:54:55 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j6SJstf5077921; Thu, 28 Jul 2005 19:54:55 GMT (envelope-from rwatson) Message-Id: <200507281954.j6SJstf5077921@repoman.freebsd.org> From: Robert Watson Date: Thu, 28 Jul 2005 19:54:55 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/usr.bin/netstat Makefile mbuf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2005 19:54:56 -0000 rwatson 2005-07-28 19:54:55 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) usr.bin/netstat Makefile mbuf.c Log: Merge mbuf.c:1.43,1.44 and Makefile:1.27 from HEAD to RELENG_6: Modify "netstat -mb" to use libmemstat(3) when acting on a live system, with a number of positive benefits: - Start using UMA(9) statistics for mbufs and clusters, which avoids using the mbuf allocator statistics which suffer from races under load on SMP. This should eliminate "negative" mbuf counts in netstat -mb. - We are now able to track cached (free) mbufs and clusters and count it towards memory allocated by the network stack. - We are now also able to track memory allocated to mbuf tags since libmemstat(3) can also query malloc(9). We don't print this except as part of the total (for now - #if 0). - We are now able to track mbuf/cluster/packet allocation failures, although they are not currently printed (#if 0). - Don't print out sfbuf statistics when running on a kernel core, as currently that code is able only to query sysctl for statistics. mbuf.c:1.44: Since libmemstat(3) now supports its own error management mechanism, use that instead of trying to use errno, in order to produce a sensible error message. Approved by: re (kensmith) Revision Changes Path 1.26.2.1 +2 -2 src/usr.bin/netstat/Makefile 1.42.8.1 +196 -34 src/usr.bin/netstat/mbuf.c