From owner-freebsd-questions@FreeBSD.ORG Fri Jul 9 20:24:25 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE2CF1065670 for ; Fri, 9 Jul 2010 20:24:24 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (ns2.r-bonomi.com [204.87.227.129]) by mx1.freebsd.org (Postfix) with ESMTP id 99D618FC18 for ; Fri, 9 Jul 2010 20:24:24 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.3/rdb1) id o69KNblU004495; Fri, 9 Jul 2010 15:23:37 -0500 (CDT) Date: Fri, 9 Jul 2010 15:23:37 -0500 (CDT) From: Robert Bonomi Message-ID: <201007092023.o69KNblU004495@mail.r-bonomi.com> To: freebsd-questions@freebsd.org, jalmberg@identry.com Cc: Subject: Re: shrinking swap space X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2010 20:24:25 -0000 > From owner-freebsd-questions@freebsd.org Fri Jul 9 08:18:56 2010 > Date: Fri, 09 Jul 2010 09:18:01 -0400 > From: John Almberg > To: freebsd-questions@freebsd.org > Subject: shrinking swap space > > Since my server locked me out last week because it was out of swap > space, I've been monitoring the swap space every 4 hours. It started off > with 3% used and little by little it has crept up to 17% this morning. > > I've been reading up on the subject in my two FreeBSD books (Absolute > and Complete) but neither give me a hint on how to find the program(s) > that are slowly eating up my swap space. > > Is there a utility that shows which programs are using swap space? Or > that can help debug this problem? 'ps' is your friend. it will show you the 'total' memory used by each process, *AND* the 'working set' size. The working set is the part of that process's address-space that is currently mapped into RAM. The -difference- betwen the total size, and the working set size is the swap usage.