Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Aug 2010 13:55:33 -0500
From:      Paul Schmehl <pschmehl_lists@tx.rr.com>
To:        Aleksandr Miroslav <alexmiroslav@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: BSD equivalent of Linux's free(1)?
Message-ID:  <17B10793E5263A663EE132C9@utd65257.utdallas.edu>
In-Reply-To: <AANLkTinY-pBzBbmg%2Bv5XQsRbhaBsJq9qxfXh9uPmhQPE@mail.gmail.com>
References:  <AANLkTikpOE%2BK6iWn38VKT_YiGY119JL5CcBVguMYq9q_@mail.gmail.com> <20100818184148.31442aa9@gumby.homeunix.com> <AANLkTinY-pBzBbmg%2Bv5XQsRbhaBsJq9qxfXh9uPmhQPE@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--On Wednesday, August 18, 2010 14:14:25 -0400 Aleksandr Miroslav 
<alexmiroslav@gmail.com> wrote:

> On Wed, Aug 18, 2010 at 1:41 PM, RW <rwmaillists@googlemail.com> 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.

man (8) pstat

pstat -s -m
Device          1M-blocks     Used    Avail Capacity
/dev/ad8s1b          8192        0     8191     0%

-- 
Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
*******************************************
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson




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