Is there a way to determine exactly how memory is being used within a
single process? I am particularly thinking about Solaris's "pmap"
program that does exactly this:
For the sendmail process, I have the following:
USER PID LWP %CPU %MEM VSZ RSS SZ COMMAND
root 232 1 0.0 0.5 2368 1648 296 /usr/lib/sendmail
So, running "/usr/proc/bin/pmap -x 232" gives me the following:
232: /usr/lib/sendmail -bd -q15m
Address Kbytes Resident Shared Private Permissions Mapped File
00010000 352 352 8 344 read/exec sendmail
00076000 16 16 - 16 read/write/exec sendmail
0007A000 240 208 - 208 read/write/exec [ heap ]
FF100000 8 8 8 - read/exec nss_dns.so.1
FF110000 8 8 - 8 read/write/exec nss_dns.so.1
FF120000 16 16 16 - read/exec nss_files.so.1
FF132000 8 8 - 8 read/write/exec nss_files.so.1
FF150000 16 16 16 - read/exec libc_psr.so.1
FF160000 16 16 16 - read/exec libmp.so.2
FF172000 8 8 - 8 read/write/exec libmp.so.2
FF180000 656 616 544 72 read/exec libc.so.1
FF232000 32 32 - 32 read/write/exec libc.so.1
FF23A000 8 8 - 8 read/write/exec [ anon ]
FF250000 8 8 - 8 read/write/exec [ anon ]
FF260000 8 8 8 - read/exec libkstat.so.1
FF270000 8 8 - 8 read/write/exec libkstat.so.1
FF280000 512 408 408 - read/exec libnsl.so.1
FF30E000 40 40 - 40 read/write/exec libnsl.so.1
FF318000 32 16 - 16 read/write/exec [ anon ]
FF330000 32 32 32 - read/exec libsocket.so.1
FF346000 16 16 - 16 read/write/exec libsocket.so.1
FF350000 136 120 120 - read/exec libresolv.so.2
FF380000 16 16 - 16 read/write/exec libresolv.so.2
FF384000 8 8 - 8 read/write/exec [ anon ]
FF390000 8 8 8 - read/exec libdl.so.1
FF3A0000 8 8 - 8 read/write/exec [ anon ]
FF3B0000 120 120 120 - read/exec ld.so.1
FF3DC000 8 8 - 8 read/write/exec ld.so.1
FFBEA000 24 24 - 24 read/write [ stack ]
-------- ------ ------ ------ ------
total Kb 2368 2160 1304 856
Presumably, it is only the Private memory space that I would really be
interested in, since that is what isn't shared with other processes on
the system and would be the memory footprint added to the overal memory
usage of the system. I am guessing that the Resident size will drop to
be closer to the Private size as the number of similar (i.e. sendmail
in this case) processes increase, since only one process will be using
the memory for shared libraries and the other processes will be using
what the first process already consumed.
Since this is a pretty detailed breakdown of exactly how memory is used
within a process, including heap and stack usage, I wonder if Tru64 has
anything that even comes close to this? I have needed to answer some
questions in the past relating to process memory consumption and just
can't put my finger on anything that would easily answer those questions.
If anybody has ideas, I would greatly appreciate them! :)
Thanks,
Scott
--
+-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-+
Scott W. Adkins http://www.cns.ohiou.edu/~sadkins/
UNIX Systems Engineer mailto:adkinss_at_ohio.edu
ICQ 7626282 Work (740)593-9478 Fax (740)593-1944
+-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-+
CNS, HDL Center, Suite 301, Ohio University, Athens, OH 45701-2979
Received on Fri Oct 19 2001 - 15:50:00 NZDT