From owner-freebsd-questions@FreeBSD.ORG Wed Sep 2 13:43:43 2009 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 6199E1065695 for ; Wed, 2 Sep 2009 13:43:43 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mx1.freebsd.org (Postfix) with ESMTP id CB8D68FC1F for ; Wed, 2 Sep 2009 13:43:42 +0000 (UTC) Received: from localhost (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTPSA id D6516EBC0A; Wed, 2 Sep 2009 09:43:41 -0400 (EDT) Date: Wed, 2 Sep 2009 09:43:37 -0400 From: Bill Moran To: Per olof Ljungmark Message-Id: <20090902094337.cb820a76.wmoran@potentialtech.com> In-Reply-To: <4A9E73F2.2000908@intersonic.se> References: <4A9D8057.8020307@intersonic.se> <20090901162931.d85ec256.wmoran@potentialtech.com> <20090901204147.GC2855@dan.emsphone.com> <4A9DB590.6080605@intersonic.se> <20090902083348.40c21529.wmoran@potentialtech.com> <4A9E73F2.2000908@intersonic.se> Organization: Bill Moran X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.5; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: memory usage displsy 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: Wed, 02 Sep 2009 13:43:44 -0000 In response to Per olof Ljungmark : > Bill Moran wrote: > > In response to Per olof Ljungmark : > > > >> Dan Nelson wrote: > >>> In the last episode (Sep 01), Bill Moran said: > >>>> In response to Per olof Ljungmark : > >>>>> What is a good way to find out how memory is used? Have a 6.4 box where > >>>>> memory is used by something but I fail to see what is using it - tried > >>>>> different switches to ps(1), tried the stat tools but a big chunk of > >>>>> memory does not show at all. > >>>>> > >>>>> A proper tool for analyzing memory usage "live", this is a production > >>>>> box? > >>>> I've always been able to get what I need from top. You can do -o res to > >>>> sort by resident memory usage, which helps. > >>> ps will sort by memory usage when given the -m flag. Also check ipcs -a to > >>> see if there are any sysv shared memory segments hanging arnound. If you > >>> don't see anything using the memory, where are you seeing that "something" > >>> is using it? > >>> > >> ...and here is top output after I stopped Postfix, slapd and Cyrus-IMAP. > >> Still over 3G Active. > > > > > > > > You did not sort by res and there are only 40 processes showing, which > > means your output is truncated and may have truncated the problematic > > process. > > > > Please use "top -o res" to get the output sorted by memory usage, or > > don't truncate the output (former preferred). > > > > Also, please provide the output of "ipcs -a" > > There was no more processes... >From your top output: > 45 processes: 1 running, 44 sleeping There were 40 processes listed, so there were 5 not shown. > ipcs -a OK, this verifies that nothing is tied up in shared memory. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/