From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] output of ps(1) memory usage From: "Russ Cox" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 20 Feb 2003 21:30:58 -0500 Topicbox-Message-UUID: 6c5999d6-eacb-11e9-9e20-41e7f4b1d025 ps shows how much is physically mapped within a process, and reading /proc/pid/segment will show you exactly where it is mapped. the hard part comes when you want to figure out the total for a set of processes, because figuring out the intersection is not so easy. for procs sharing memory, only the stacks are different, and stacks tend to be only a page or two, so as rob said, what's listed in ps applies to the collection of procs pretty well.