From owner-freebsd-current@FreeBSD.ORG Thu Jun 8 23:53:52 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C90F16A4AC for ; Thu, 8 Jun 2006 23:53:52 +0000 (UTC) (envelope-from wilkinsa@squash.dsto.defence.gov.au) Received: from digger1.defence.gov.au (digger1.defence.gov.au [203.5.217.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E06843D70 for ; Thu, 8 Jun 2006 23:53:29 +0000 (GMT) (envelope-from wilkinsa@squash.dsto.defence.gov.au) Received: from ednmsw501.dsto.defence.gov.au (ednmsw501.dsto.defence.gov.au [131.185.2.150]) by digger1.defence.gov.au with ESMTP id k58NpUMQ000923 for ; Fri, 9 Jun 2006 09:21:30 +0930 (CST) Received: from muttley.dsto.defence.gov.au (unverified) by ednmsw501.dsto.defence.gov.au (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Fri, 9 Jun 2006 09:23:21 +0930 Received: from ednex510.dsto.defence.gov.au (ednex510.dsto.defence.gov.au [131.185.2.170]) by muttley.dsto.defence.gov.au (8.11.3/8.11.3) with ESMTP id k58NnC712631 for ; Fri, 9 Jun 2006 09:19:12 +0930 (CST) Received: from squash.dsto.defence.gov.au ([131.185.40.212]) by ednex510.dsto.defence.gov.au with Microsoft SMTPSVC (6.0.3790.1830); Fri, 9 Jun 2006 09:19:12 +0930 Received: from squash.dsto.defence.gov.au (localhost [127.0.0.1]) by squash.dsto.defence.gov.au (8.13.3/8.13.3) with ESMTP id k58Nm5vF057408 for ; Fri, 9 Jun 2006 09:18:05 +0930 (CST) (envelope-from wilkinsa@squash.dsto.defence.gov.au) Received: (from wilkinsa@localhost) by squash.dsto.defence.gov.au (8.13.3/8.13.3/Submit) id k58Nm5nZ057407 for freebsd-current@freebsd.org; Fri, 9 Jun 2006 09:18:05 +0930 (CST) (envelope-from wilkinsa) Date: Fri, 9 Jun 2006 09:18:05 +0930 From: "Wilkinson, Alex" To: freebsd-current@freebsd.org Message-ID: <20060608234805.GM40068@squash.dsto.defence.gov.au> Mail-Followup-To: freebsd-current@freebsd.org References: <20060606071736.J68996@fledge.watson.org> <20060606073436.GK27880@squash.dsto.defence.gov.au> <20060606090919.U68996@fledge.watson.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20060606090919.U68996@fledge.watson.org> User-Agent: Mutt/1.5.11 X-OriginalArrivalTime: 08 Jun 2006 23:49:12.0214 (UTC) FILETIME=[247B3360:01C68B56] X-TM-AS-Product-Ver: SMEX-7.0.0.1345-3.52.1006-14494.003 X-TM-AS-Result: No--2.890000-0.000000-31 Subject: Re: libmemstat(3) - Library for monitoring kernel memory use X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 23:53:52 -0000 0n Tue, Jun 06, 2006 at 09:11:10AM +0100, Robert Watson wrote: > >On Tue, 6 Jun 2006, Wilkinson, Alex wrote: > >> 0n Tue, Jun 06, 2006 at 07:20:39AM +0100, Robert Watson wrote: >> >> > >> >On Tue, 6 Jun 2006 bhuvan.kumarmital@wipro.com wrote: >> > >> >> Saw your tool (memtop) for monitoring kernel memory. I'd like to >> use a >> >>similar tool for linux, i believe your tool is bsd based. Could you >> tell >> >>me a similar tool, or perhaps another version of memtop built for >> linux. >> >>I'd really appreciate you help. Please reply on my email address. >> > >> >You are correct that libmemstat and derived tools currently rely on >> >features present in the FreeBSD kernel. The library provides a general >> >monitoring abstraction over a set of specific kernel memory allocators >> -- >> >specifically, the FreeBSD malloc(9) and uma(9) allocators. It is >> >relatively straight forward to implement that abstraction for other >> memory >> >allocators, such as user space allocators or kernel allocators from >> other >> >platforms, but that work has not been done (as far as I know). I'm not >> >aware of specific monitoring tools for the Linux operating system that >> are >> >able to perform this type of profiling/monitoring, although I presume >> some >> >sort of kernel memory profiling tool does exist. >> >>Erm, Robert, where does memtop live ? I can find it in ports nor base >>system. > >memtop is an experimental monitoring tool based on libmemstat, you can find >the source here: > > http://www.watson.org/~robert/freebsd/libmemstat/ > >Possibly something like this could be integrated into systat, but my >ncurses knowledge is a bit weak, and I've not had a chance to investigate >further. As with vmstat, the interpretation of the output requires a >moderate amount of insight into how the kernel works, so I've been a bit >reluctant to push it as a debugging tool without some more refinement. I >think it would be neat if someone picked it up and did something useful >with it, though :-). I assume this only works with -CURRENT ? -aW