From owner-freebsd-current@FreeBSD.ORG Thu Feb 28 12:28:59 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9D66106566C for ; Thu, 28 Feb 2008 12:28:59 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 607808FC29 for ; Thu, 28 Feb 2008 12:28:59 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m1SCSvF3063845; Thu, 28 Feb 2008 13:28:57 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m1SCSv03063844; Thu, 28 Feb 2008 13:28:57 +0100 (CET) (envelope-from olli) Date: Thu, 28 Feb 2008 13:28:57 +0100 (CET) Message-Id: <200802281228.m1SCSv03063844@lurza.secnetix.de> From: Oliver Fromme To: freebsd-current@FreeBSD.ORG, arne@rfc2549.org In-Reply-To: <47C60C62.9090901@rfc2549.org> X-Newsgroups: list.freebsd-current User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 28 Feb 2008 13:28:58 +0100 (CET) Cc: Subject: Re: Specific Swap Usage X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-current@FreeBSD.ORG, arne@rfc2549.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2008 12:29:00 -0000 Arne Schwabe wrote: > If there is currently no ways to see which processes allocates how much > swap space are there any pointers where to look to implement such a feature? The problem is that there is no one-to-one relationship between memory pages (including those paged out to swap) and processes. Some pages belong to multiple processes, i.e. they're shared (e.g. libraries, IPC shared memory). Therefore it is very non-trivial to specify exactly the amount of memory (or swap space) allocated to a process. Part of the problem is that different people often mean different things when talking about "memory" or "swap". Also note that swapping and paging are different things. If your goal is to find out which process is causing the exhaustion of swap, the best way is to record the SIZE ("RSS" in ps) of all processes in order to see which one keeps growing. Usually it's rather easy to find. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs." -- Robert Firth