Ever wonder what's going on in your system's memory (RAM) ? Solaris provides a mdb dcmd ::memstat , which provides the status of all the pages in memory. Following is an example of "memstat" in action on my Solaris 10 machine.
jalandhar% su
Password:
# memstat
# mdb -k
Loading modules: [ unix krtld genunix specfs dtrace ufs sd ip sctp usba fctl nca nfs audiosup random sppp ptm ipc ]
> ::memstat
Page Summary Pages MB %Tot
------------ ---------------- ---------------- ----
Kernel 13643 106 5%
Anon 43533 340 17%
Exec and libs 8669 67 3%
Page cache 5757 44 2%
Free (cachelist) 23950 187 9%
Free (freelist) 163652 1278 63%
Total 259204 2025
Physical 255368 1995
Similarly, there is another tool, pmap, that can be used to look at the address space mapping of a process. "pmap" is one of the /proc file-system based utility and provides output as follows. See "man pmap" for more detail.
jalandhar% pmap 791
791: /bin/ksh -p /usr/sfw/bin/mozilla
00010000 200K r-x-- /usr/bin/ksh
00052000 8K rwx-- /usr/bin/ksh
00054000 48K rwx-- [ heap ]
FF280000 848K r-x-- /lib/libc.so.1
FF364000 32K rwx-- /lib/libc.so.1
FF36C000 8K rwx-- /lib/libc.so.1
FF38E000 8K rwxs- [ anon ]
FF398000 16K r-x-- /platform/sun4u/lib/libc_psr.so.1
FF3A0000 24K rwx-- [ anon ]
FF3B0000 176K r-x-- /lib/ld.so.1
FF3EC000 8K rwx-- /lib/ld.so.1
FF3EE000 8K rwx-- /lib/ld.so.1
FFBFC000 16K rw--- [ stack ]
total 1400K
posted by Amandeep 5/29/2006 02:12:00 PM | PERMALINK