From owner-freebsd-questions@FreeBSD.ORG Wed Aug 18 18:14:30 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 151FD106564A for ; Wed, 18 Aug 2010 18:14:30 +0000 (UTC) (envelope-from alexmiroslav@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9DFED8FC0C for ; Wed, 18 Aug 2010 18:14:29 +0000 (UTC) Received: by ewy26 with SMTP id 26so707474ewy.13 for ; Wed, 18 Aug 2010 11:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=/2jeMAjfwyXuYRtMaLS4HzH8s8XLdaQuEAmgVUrnj5w=; b=qVr4FtyFGpEw8C59zdWQVDheeZyaed6jAdZvF4O6x01EXrRdGLYMRYcooLyBGNamp6 3jSa50yiNqa1xSwugc5JQ2xoNv0DkCfy9unj1IwHhXa28Betz7dTftF4l0ct5m5UbJb/ 3nHi3T/mwx4hEyhbfHOvlv/VJ96+Qn7mXKeLA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=T0KQEQdaB1F0rg97xcnrOyyXcC6yvP1QwRtOpx1R0F0QHOtDmqtNkJa1dQTInb5TDF 92uLZqfu3hJiL0+QddrrXk6HeNVTh10JFh1b+1Ild/oOq8oWdfcyGhrer7qe+IdRn6lM rhoEeexUXpI7T40COVFvBg2OW0p0RAuUKcWvA= MIME-Version: 1.0 Received: by 10.213.113.12 with SMTP id y12mr608875ebp.53.1282155265816; Wed, 18 Aug 2010 11:14:25 -0700 (PDT) Received: by 10.213.108.198 with HTTP; Wed, 18 Aug 2010 11:14:25 -0700 (PDT) In-Reply-To: <20100818184148.31442aa9@gumby.homeunix.com> References: <20100818184148.31442aa9@gumby.homeunix.com> Date: Wed, 18 Aug 2010 14:14:25 -0400 Message-ID: From: Aleksandr Miroslav To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: BSD equivalent of Linux's free(1)? 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, 18 Aug 2010 18:14:30 -0000 On Wed, Aug 18, 2010 at 1:41 PM, RW wrote: > Is there any particular reason you want to know? Free memory isn't a > very meaningful concept in FreeBSD. I have a webserver that had it's Apache killed this morning. The box itself had been stable for several years, as well as the Apache instance. The error that I saw in /var/log/messages was something along the following: "pid 1234 (httpd), uid 100, was killed: out of swap space" So I went to check what was eating up the swap, The problem itself was tracked down fairly easily, someone had added a shelt script to cron (/home/user/foo.sh) and had mistakenly put the full path to the script into the script itself -- essentially creating a forkbomb. But while I was in the middle of debugging this and noticed that line from the logfile, I spent more time than necessary trying to figure out exactly how much swap/memory was being used, and who was using it.