From owner-freebsd-stable@FreeBSD.ORG Tue Feb 15 04:35:56 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B65716A4CE for ; Tue, 15 Feb 2005 04:35:56 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4184D43D2F for ; Tue, 15 Feb 2005 04:35:56 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id j1F4ZtRx029022; Mon, 14 Feb 2005 22:35:55 -0600 (CST) (envelope-from dan) Date: Mon, 14 Feb 2005 22:35:55 -0600 From: Dan Nelson To: Kris Kennaway Message-ID: <20050215043554.GA83537@dan.emsphone.com> References: <20050215012633.M48733@reiteration.net> <20050215024139.GA97764@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050215024139.GA97764@xor.obsecurity.org> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.7i cc: freebsd-stable@freebsd.org Subject: Re: swapfile being eaten by unknown process X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Feb 2005 04:35:56 -0000 In the last episode (Feb 14), Kris Kennaway said: > On Tue, Feb 15, 2005 at 01:30:42AM +0000, John wrote: > > Is there a way of seeing *what* program/process is eating swap. > > There are loads of ways of seeing that it is being eaten, but so > > far haven't found a way of knowing what eats, so can't fix the > > problem. Can anyone enlighten me? > > Use ps or top, and look for the process with the huge size. This is > not foolproof, because a process can allocate memory without using it > (e.g. rpc.statd), but it's a place to start. If you see a process > that is both large, and paging to/from disk, that's a better > indication. To see which processes are paging: run top, hit 'm' to switch modes, and hit 'o' then 'fault' to sort the processes by how many page faults they are doing. This isn't completely foolproof either, since reads from mmap()ed files count as faults as well. -- Dan Nelson dnelson@allantgroup.com