Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Feb 2005 22:35:55 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: swapfile being eaten by unknown process
Message-ID:  <20050215043554.GA83537@dan.emsphone.com>
In-Reply-To: <20050215024139.GA97764@xor.obsecurity.org>
References:  <20050215012633.M48733@reiteration.net> <20050215024139.GA97764@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050215043554.GA83537>