Section 6.8. Using pmap to Inspect Process Memory Usage


6.8. Using pmap to Inspect Process Memory Usage

You can use the pmap command to show the individual memory mappings that make up a process's address space. You can also use pmap to see the total amount of physical memory used by a process (its RSS) and to gather more information about how a process uses its memory. Since processes share some memory with others through the use of shared libraries and other shared memory mappings, you could overestimate system-wide memory usage by counting the same shared pages multiple times. To help with this situation, consider the amount of nonshared anonymous memory allocated as an estimation of a process's private memory usage, (shown in the Anon column). We cover more on this topic in Section 6.7.

sol9$ pmap -x 102908 102908:   sh Address   Kbytes Resident   Anon  Locked Mode   Mapped File 00010000      88      88       -       - r-x--  sh 00036000       8       8       8       - rwx--  sh 00038000      16      16      16       - rwx--    [ heap ] FF260000      16      16       -       - r-x--  en_.so.2 FF272000      16      16       -       - rwx--  en_US.so.2 FF280000     664     624       -       - r-x--  libc.so.1 FF336000      32      32       8       - rwx--  libc.so.1 FF360000      16      16       -       - r-x--  libc_psr.so.1 FF380000      24      24       -       - r-x--  libgen.so.1 FF396000       8       8       -       - rwx--  libgen.so.1 FF3A0000       8       8       -       - r-x--  libdl.so.1 FF3B0000       8       8       8       - rwx--    [  anon ] FF3C0000     152     152       -       - r-x--  ld.so.1 FF3F6000       8       8       8       - rwx--  ld.so.1 FFBFE000       8       8       8       - rw---    [ stack ] --------   -----   -----   -----   ------ total Kb    1072    1032      56       - 





Solaris Performance and Tools(c) Dtrace and Mdb Techniques for Solaris 10 and Opensolaris
Solaris Performance and Tools: DTrace and MDB Techniques for Solaris 10 and OpenSolaris
ISBN: 0131568191
EAN: 2147483647
Year: 2007
Pages: 180

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net