lkml.org 
[lkml]   [2007]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: Question about free/used memory on Linux
Date
From
Thanks Padraig.

Any idea how to get the size of running linux kernel ?

Ravi

-----Original Message-----
From: Pádraig Brady [mailto:P@draigBrady.com]
Sent: Wednesday, November 14, 2007 3:58 AM
To: Ravinandan Arakali (rarakali)
Cc: Vaidyanathan Srinivasan; Linux Kernel
Subject: Re: Question about free/used memory on Linux

Ravinandan Arakali (rarakali) wrote:
> Hi Vaidy,
> What do you think is the right way to get the memory usage of a
> process, I mean the actual physical memory used ? Basically, I'm
> interested in the incremental cost of a process, which means, I don't
> want to include the text segments of shared libraries which would
> remain even after the process is killed (since it would be used by
> other processes).
>
> Is the RSS field of "ps aux" command the right one or use "pmap"
> command and look at the "writeable" segments ?

I already commented on this thread with a python script for reporting RAM usage for programs.

RSS = Private and Shared Resident pages.
You can get the shared value for a process from /proc/$$/smaps (as is done in the script)

Pádraig.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-11-14 19:21    [W:2.810 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site