From owner-freebsd-jail@FreeBSD.ORG Thu Jun 4 05:59:53 2009 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14E4B1065674 for ; Thu, 4 Jun 2009 05:59:53 +0000 (UTC) (envelope-from kostjn@peterhost.ru) Received: from mail.z8.ru (mail.z8.ru [80.93.58.56]) by mx1.freebsd.org (Postfix) with ESMTP id C14DB8FC14 for ; Thu, 4 Jun 2009 05:59:52 +0000 (UTC) (envelope-from kostjn@peterhost.ru) Received: from [85.235.196.139] (helo=kostjn.pht) by mail.z8.ru with esmtpa (Exim 4.67 (FreeBSD)) (envelope-from ) id 1MC5zR-000L6q-Ay for freebsd-jail@freebsd.org; Thu, 04 Jun 2009 09:59:49 +0400 Message-ID: <4A276356.7040704@peterhost.ru> Date: Thu, 04 Jun 2009 10:01:58 +0400 From: Menshikov Konstantin User-Agent: Thunderbird 2.0.0.18 (X11/20090328) MIME-Version: 1.0 CC: freebsd-jail@freebsd.org References: <20090603180221.E56412@hub.org> <4A275D80.5050408@peterhost.ru> <4A275CE4.9020408@modulus.org> In-Reply-To: <4A275CE4.9020408@modulus.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Calculating per jail memory usage ... X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 05:59:53 -0000 Andrew Snow wrote: > Menshikov Konstantin wrote: >> Now in a kernel there is no mechanism with which help it is possible >> to count a memory size occupied with processes in jail. >> After this mechanism will appear, it will be possible to add top :) > > Are there any plans to add this? > > There needs to be a way more generally (ie. not just for jails) to > find out total memory used by a set of processes which may or may not > have shared memory. > > > - Andrew > > The patch will be added, after testing, I hope. In a case jail it was necessary for memory size restriction. I do not think that in a kernel it is necessary to add possibility of definition of the size of memory occupied with any group of processes. Easier to count memory as conclusion parsing pmap (/usr/ports/sysutils/pmap/) output for several processes.