Linux pmap command!

Source: Internet
Author: User
Original post: http://tonykorn97.itpub.net/post/6414/249221

Linux pmap command! ========================================================== ========================== Author: tonykorn97 (http://tonykorn97.itpub.net)
Posted at: 2007.01.09
Category: Linux
Source: http://tonykorn97.itpub.net/post/6414/249221
---------------------------------------------------------------

Pmap

LDD

Stace

Several familiar Debugging commands!

Observe that the address space distribution of the specified process in the system shows the size of each segment of the target file in a target file or Linked Library file. This file is from/proc/ /Maps.
Command Format:
Pmap

Example:
[Root @ localhost Security] # pmap-D 4993
4993:-Bash
Address Kbytes mode Offset Device Mapping
08047000 596 R-X -- 0000000000000000 bash code snippet
080dc000 28 rwx -- 0000000000094000 006 bash Data Segment
080e3000 280 rwx -- 20170000080e3000 000:00000 [anon] bash heap
4d575000 84 R-X -- 0000000000000000 00:00006 code snippet of the ld-2.3.4.so shared library
4d58a000 4 R-X -- 0000000000015000 006 data segment of the ld-2.3.4.so shared library
4d58b000 4 rwx -- 0000000000016000 006 ld-2.3.4.so shared library heap
4d58e000 1164 R-X -- 0000000000000000 00:00006 libc-2.3.4.so
4d6b1000 4 R-X -- 0000000000123000 libc-2.3.4.so
4d6b2000 12 rwx -- 0000000000124000 libc-2.3.4.so
4d6b5000 8 rwx -- 2017100004d6b5000 000:00000 [anon] anonymous physical memory,
4d6de000 8 R-X -- 0000000000000000 libdl-2.3.4.so
4d6e0000 8 rwx -- 0000000000001000 00:00006 libdl-2.3.4.so
4d807000 12 r-X -- 0000000000000000 00:00006 libtermcap. so.2.0.8
4d80a000 4 rwx -- 0000000000002000 00:00006 libtermcap. so.2.0.8
B7bc2000 176 R-X -- 0000000000000000 00:00006 gb18030.so
B7bee000 8 rwx -- 000000000002b000 00:00006 gb18030.so
B7bf0000 24 R-xs-0000000000000000 gconv-modules.cache
B7bf6000 1060 R-X -- 0000000002197000 00:00006 locale-Archive
B7cff000 2048 R-X -- 0000000000000000 00:00006 locale-Archive
B7eff000 36 R-X -- 0000000000000000 libnss_files-2.3.4.so
B7f08000 8 rwx -- 0000000000008000 libnss_files-2.3.4.so
B7f0a000 8 rwx -- commandid b7f0a000 000:00000 [anon]
B7f20000 8 rwx -- commandid b7f20000 000:00000 [anon]
Bff0d000 84 RW --- zookeeper bff0d000 000:00000 [Stack]
Ffffe000 4 ----- 0000000000000000 000:00000 [anon]
Mapped: 5680 K writeable/PRIVATE: 460 K shared: 24 K

The meaning of each column is as follows:
Parameter description
Address: address space occupied by 000000000-0038d000 Processes
Kbytes size of the virtual segment
RSS device number (main device: Secondary device)
Anon device node number, 0 indicates no node corresponds to memory
Whether locked allows swapped
Mode permission: r = read, W = write, x = execute, S = shared, P = private (copy on write)
Mapping: The image file name corresponding to bash

[Root @ localhost Security] # pmap-x 4993
4993:-Bash
Address Kbytes RSS anon locked mode Mapping
08047000 596---r-X -- bash
080dc000 28---rwx -- bash
080e3000280---rwx -- [anon]
4d575000 84---r-X -- ld-2.3.4.so
4d58a000 4---r-X -- ld-2.3.4.so
4d58b000 4---rwx -- ld-2.3.4.so
4d58e000 1164---r-X -- libc-2.3.4.so
4d6b1000 4--r-X -- libc-2.3.4.so
4d6b2000 12---rwx -- libc-2.3.4.so
4d6b5000 8---rwx -- [anon]
4d6de000 8---r-X -- libdl-2.3.4.so
4d6e0000 8---rwx -- libdl-2.3.4.so
4d807000 12---r-X -- libtermcap. so.2.0.8
4d80a000 4---rwx -- libtermcap. so.2.0.8
B7bc2000176---r-X -- gb18030.so
B7bee000 8---rwx -- gb18030.so
B7bf0000 24---r-xs-gconv-modules.cache
B7bf6000 1060---r-X -- locale-Archive
B7cff0002048---r-X -- locale-Archive
B7eff000 36---r-X -- libnss_files-2.3.4.so
B7f08000 8---rwx -- libnss_files-2.3.4.so
B7f0a000 8---rwx -- [anon]
B7f20000 8---rwx -- [anon]
Bff0d000 84---RW --- [Stack]
Ffffe000 4------- [anon]
------------------------------------
Total kb 5680 ---
[Root @ localhost Security] #

Tonykorn97 was published at: 2007.01.09: Category :( Linux): Read: (772 times ):: Comment (0)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.