RE: [flalug] more memory questions...

From: Larry Brown (larry.brown@dimensionnetworks.com)
Date: Wed Mar 10 2004 - 16:43:08 EST


So each numbered folder in proc is associated with each running process and
status is the file tracking its current size etc.? The status from one I
just pulled gives...

FDSize
VmSize
VmLck
VmRSS
VmData
VmStk
VmExe
VmLib

I take it Vm does not mean Virtual Memory? As RSS means the portion loaded
into memory right? Do you know where can I get a breakdown of the
significance of these values?

-----Original Message-----
From: flalug@nks.net [mailto:flalug@nks.net]On Behalf Of Eben King
Sent: Wednesday, March 10, 2004 4:17 PM
To: flalug@nks.net
Subject: RE: [flalug] more memory questions...

On Wed, 10 Mar 2004, Larry Brown wrote:

> OK, top is not really what I'm looking for because I'm wanting to script a
> process taht upon vm overload approach a script checks the pid numbers
from
> the httpd access log, then calls something like ps and captures the
response
> and evaluates which are the highest etc.

That's what the "-b" is for -- it does its thing then quits. Try it.

> Server sits at rest with 0 swap in use (according to free and top) Then 5
> minutes later, I have 50 to 60% swap in use.

When that happens, you can do something like

grep -h ^Vm /proc/[0-9]*/status | grep -v VmLck | sort | uniq -c | sort

and look for big numbers, or lots of smaller numbers. Once you find them,

grep '<parameter>: *<number> kB' /proc/[0-9]*/status
                  ^^^^^^^ tab, space

will give you the PID, and

ps <PID>

will give you the name.

I'm sure there's a less convoluted way to find out, but that's the first
thing that came to mind.

> I have looked at top using M to sort by memory usage and nothing seems
> excessively high.

Maybe a bunch of smaller processes? Especially statically-linked ones.
Pre-launched httpds?

--
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
SAGITTARIUS:  All your friends are laughing behind your back... kill
them.  Take down all those naked pictures of Ernest Borgnine you've got
hanging in your den.  -- Weird Al, _Your Horoscope for Today_



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:15:20 EDT