SunSolve Internal

Infodoc ID   Synopsis   Date
11923   How can one tell how much memory is being used by a process   27 Jan 1998

Description Top

How you can tell how much memory is being used by a process (context
 is both 4.x and 5.x systems).
 

It depends on the OS and what you mean by memory:

4.x: ps aux
        SZ is size of virtual data+stack in KB (note: text not included)
        RSS is an approximate measure of the amount of physical memory used in 
        kilobytes.

<= 5.3: /usr/ucb/ps aux
        SZ is size of virtual address space in pages
        RSS is an approximate measure of the amount of physical memory used in 
        pages.


>= 5.4: /usr/ucb/ps aux
        SZ is size of virtual address space in KB
        RSS is an approximate measure of the amount of physical memory used in 
        kilobytes.

>=5.5:  pmap (see proc(1) man page)
	See example output below:

$ /usr/proc/bin/pmap 1701
1701:	/bin/ksh
00010000    184K read/exec         /usr/bin/ksh
0004C000      8K read/write/exec   /usr/bin/ksh
0004E000     40K read/write/exec     [ heap ]
EF600000    592K read/exec         /usr/lib/libc.so.1
EF6A2000     24K read/write/exec   /usr/lib/libc.so.1
EF6A8000      8K read/write/exec     [ anon ]
EF6C0000     16K read/exec         /usr/platform/sun4u/lib/libc_psr.so.1
EF6D0000     16K read/exec         /usr/lib/libmp.so.2
EF6E2000      8K read/write/exec   /usr/lib/libmp.so.2
EF700000    448K read/exec         /usr/lib/libnsl.so.1
EF77E000     32K read/write/exec   /usr/lib/libnsl.so.1
EF786000     24K read/write/exec     [ anon ]
EF790000     32K read/exec         /usr/lib/libsocket.so.1
EF7A6000      8K read/write/exec   /usr/lib/libsocket.so.1
EF7A8000      8K read/write/exec     [ anon ]
EF7B0000      8K read/exec/shared  /usr/lib/libdl.so.1
EF7C0000    112K read/exec         /usr/lib/ld.so.1
EF7EA000     16K read/write/exec   /usr/lib/ld.so.1
EFFFC000     16K read/write/exec     [ stack ]
 total     1600K

	The first column is the address of the segment, the second is the size,
	the third is the permissions and the fourth tells where the segment
	comes from (library, binary, etc.).
Product Area Kernel
Product Performance
OS any
Hardware any

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team