Linux pmap command

Source: Internet
Author: User
Linux performance test pmap command name: pmap-reportmemorymapofaprocess (view process memory image information) usage www.2cto. compmap [-x |-d] [-q] pids... pmap-V option meaning -...
Linux performance test pmap command name: pmap-report memory map of a process (view the memory image information of the process) usage: www.2cto.com pmap [-x |-d] [-q] pids... pmap-V option meaning-x extended Show the extended format. display the extended format-d device Show the device format. display device format-q quiet Do not display some header/footer lines. -V show version Displays version of program. display version extension format and device format domain: Address: start address of map image start Address Kbytes: size of map in kilobyt Es image size RSS: resident set size in kilobytes resident set size Dirty: dirty pages (both shared and private) in kilobytes Dirty page size Mode: permissions on map image permission: r = read, w = write, x = execute, s = shared, p = private (copy on write) Mapping: file backing the map, or '[anon]' for allocated memory, or '[stack]' for the program stack. the image supports files. [anon] indicates the allocated memory. [stack] indicates the program stack Offset: offset into the file Offset: Device name. (Major: minor) device name www.2cto.com example: view the device format of Process 1 [root @ C44 ~] # Pmap-d 11: init [5] Address Kbytes Mode Offset Device Mapping00934000 88 r-x -- 0000000000000000 008:00005 ld-2.3.4.so0094a000 4 r ---- 0000000000015000 008:00005 ld-2.3.4.so0094b000 4 rw --- 0000000000016000 008:00005 ld-2.3.4.so0094e000 1188 r-x -- 0000000000000000 008:00005 libc-2.3.4.so00a77000 8 r ---- 0000000000129000 008:00005 libc-2.3.4.so00a79000 8 rw --- 2017100000012b000 008:00005 libc-2.3.4. So00a7b000 8 rw --- 0000000000a7b000 000:00000 [anon] 00a85000 52 r-x -- 0000000000000000 008:00005 libsepol. so.100a92000 4 rw --- zookeeper C000 008:00005 libsepol. so.100a93000 32 rw --- 0000000000a93000 000:00000 [anon] 00d9d000 52 r-x -- 0000000000000000 008:00005 libselinux. so.100daa000 4 rw --- zookeeper D000 008:00005 libselinux. so.108048000 28 r-x -- 0000000000000000 008:00005 init0804f000 4 rw --- 0000000000007000 008:00005 running 132 rw --- 0000000:00000 [anon] b7f5d000 8 rw --- 0000000:00000 [anon] bffee000 72 rw --- 0000000:00000 [stack] ffffe000 4 ----- 0000000000000000 000:00000 [anon] mapped: 1700 K writeable/private: 276 K shared: 0 K [root @ C44 ~] # The value mapped in the last line of www.2cto.com indicates the size of the virtual address space mapped by the process, that is, the virtual memory size pre-allocated by the process, that is, vszwriteable/private in ps indicates the size of the private address space occupied by the process, that is, the memory size actually used by the process. shared indicates the memory size shared by the process and other processes. view the device format of Process 1 without displaying the header and tail line [root @ C44 ~]. # Pmap-d-q 11: init [5] 00934000 88 r-x -- 0000000000000000 008:00005 ld-2.3.4.so0094a000 4 r ---- 0000000000015000 008:00005 ld-2.3.4.so0094b000 4 rw --- 0000000000016000 008:00005 ld-2.3.4.so0094e000 1188 r-x -- 0000000000000000 008:00005 libc-2.3.4.so00a77000 8 r ---- 0000000000129000 008:00005 libc-2.3.4.so00a79000 8 rw --- 000000000012b000 008:00005 libc-2.3.4.so00a7b000 8 rw --- 0000000000a7b000 0 00:00000 [anon] 00a85000 52 r-x -- 0000000000000000 008:00005 libsepol. so.100a92000 4 rw --- zookeeper C000 008:00005 libsepol. so.100a93000 32 rw --- 0000000000a93000 000:00000 [anon] 00d9d000 52 r-x -- 0000000000000000 008:00005 libselinux. so.100daa000 4 rw --- zookeeper D000 008:00005 libselinux. so.108048000 28 r-x -- 0000000000000000 008:00005 init0804f000 4 rw --- 0000000000007000 008:00005 ini T084e1000 132 rw --- 0000000:00000 [anon] b7f5d000 8 rw --- 0000000:00000 [anon] bffee000 72 rw --- 0000000:00000 [stack] ffffe000 4 ----- 0000000000000000 000:00000 [anon] [root @ C44 ~] # Www.2cto.com view the extended format of Process 1 [root @ C44 ~] # Pmap-x 11: init [5] Address Kbytes RSS Anon Locked Mode Mapping00934000 88---r-x -- ld-2.3.4.so0094a000 4--r ---- ld-2.3.4.so0094b000 4---rw --- ld-2.3.4.so0094e000 1188---r- x -- libc-2.3.4.so00a77000 8---r ---- libc-2.3.4.so00a79000 8---rw --- libc-2.3.4.so00a7b000 8---rw --- [anon] 00a85000 52---r-x -- libsepol. so.100a92000 4---rw --- libsepol. so.100a93000 32 --- Rw --- [anon] 00d9d000 52---r-x -- libselinux. so.100daa000 4---rw --- libselinux. so.108048000 28---r-x -- init0804f000 4--rw --- init084e1000 132---rw --- [anon] b7f5d000 8--rw --- [anon] bffee000 72 -- -rw --- [stack] ffffe000 4-------- [anon] -------- ------- total kB 1700--[root @ C44 ~] # Display the last line of the device format of process 3066 cyclically. The interval is 2 seconds. for example, www.2cto.com [root @ C44 ~]. # While true; do pmap-d 3066 | tail-1; sleep 2; donemapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 Kmapped: 5412 K writeable/private: 2028 K shared: 0 K author txw1958
Related Article

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.