Xref: utzoo alt.sys.sun:3789 comp.unix.admin:1761 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: alt.sys.sun,comp.unix.admin Subject: Re: Memory usage questions Keywords: Sun, memory, ps Message-ID: <1991May8.170752.13521@Think.COM> Date: 8 May 91 17:07:52 GMT References: <1991May8.151630.12279@DMI.USherb.CA> Sender: news@Think.COM Reply-To: barmar@think.com Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 22 In article <1991May8.151630.12279@DMI.USherb.CA> beauchem@roselin.DMI.USherb.CA (Denis Beauchemin) writes: >I am trying to compute the amount of main memory used by some processes and I >don't know exactly what to look at in the ps output. When I do a "ps aux" I >get the SZ and RSS fields that detail memory usage. Is one a subset of the >other or do I have to add them up to get the real picture? It's a little more complicated than that. SZ is the size of the data and stack segments of the process. This is basically the amount of swap space that is being used (the text segment is paged directly out of the object file and shared libraries). RSS is the Resident Set Size. This is the amount of physical memory that is being used by this process, i.e. the number of kbytes that are paged in from disk (in any segment). I'm not sure how this accounts for memory pages that are in use by multiple processes (e.g. multiple processes paging their text segment from the same binary). -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar