查看進程記憶體映像命令pmap

來源:互聯網
上載者:User

名稱:
pmap - report memory map of a process(查看進程的記憶體映像資訊)
用法
pmap [ -x | -d ] [ -q ] pids...
pmap -V
選項含義
-x extended Show the extended format. 顯示擴充格式
-d device Show the device format. 顯示裝置格式
-q quiet Do not display some header/footer lines. 不顯示頭尾行
-V show version Displays version of program. 顯示版本

擴充格式和裝置格式域:
Address: start address of map 映像起始地址
Kbytes: size of map in kilobytes 映像大小
RSS: resident set size in kilobytes 駐留集大小
Dirty: dirty pages (both shared and private) in kilobytes 髒頁大小
Mode: permissions on map 映像許可權: 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. 映像支援檔案,[anon]為已指派記憶體 [stack]為程式堆棧
Offset: offset into the file 檔案位移
Device: device name (major:minor) 裝置名稱

[root@SPA ~]# pmap -x 30323032:   ./testAddress           Kbytes     RSS   Dirty Mode   Mapping0000000000400000       4       4       0 r-x--  test0000000000600000       4       4       4 rw---  test000000001cd04000     132       4       4 rw---    [ anon ]0000003257e00000     112      96       0 r-x--  ld-2.5.so000000325801b000       4       4       4 r----  ld-2.5.so000000325801c000       4       4       4 rw---  ld-2.5.so0000003258200000    1336     268       0 r-x--  libc-2.5.so000000325834e000    2044       0       0 -----  libc-2.5.so000000325854d000      16      12       8 r----  libc-2.5.so0000003258551000       4       4       4 rw---  libc-2.5.so0000003258552000      20      16      16 rw---    [ anon ]00002ac4f8c8f000       8       8       8 rw---    [ anon ]00002ac4f8ca6000       8       8       8 rw---    [ anon ]00007fff69817000      84      12      12 rw---    [ stack ]ffffffffff600000    8192       0       0 -----    [ anon ]----------------  ------  ------  ------total kB           11972     444      72[root@SPA ~]# pmap -d 30323032:   ./testAddress           Kbytes Mode  Offset           Device    Mapping0000000000400000       4 r-x-- 0000000000000000 000:00018 test0000000000600000       4 rw--- 0000000000000000 000:00018 test000000001cd04000     132 rw--- 000000001cd04000 000:00000   [ anon ]0000003257e00000     112 r-x-- 0000000000000000 0fc:00000 ld-2.5.so000000325801b000       4 r---- 000000000001b000 0fc:00000 ld-2.5.so000000325801c000       4 rw--- 000000000001c000 0fc:00000 ld-2.5.so0000003258200000    1336 r-x-- 0000000000000000 0fc:00000 libc-2.5.so000000325834e000    2044 ----- 000000000014e000 0fc:00000 libc-2.5.so000000325854d000      16 r---- 000000000014d000 0fc:00000 libc-2.5.so0000003258551000       4 rw--- 0000000000151000 0fc:00000 libc-2.5.so0000003258552000      20 rw--- 0000003258552000 000:00000   [ anon ]00002ac4f8c8f000       8 rw--- 00002ac4f8c8f000 000:00000   [ anon ]00002ac4f8ca6000       8 rw--- 00002ac4f8ca6000 000:00000   [ anon ]00007fff69817000      84 rw--- 00007ffffffe9000 000:00000   [ stack ]ffffffffff600000    8192 ----- 0000000000000000 000:00000   [ anon ]mapped: 11972K    writeable/private: 264K    shared: 0K


mapped 表示該進程映射的虛擬位址空間大小,也就是該進程預先分配的虛擬記憶體大小,即ps出的vsz
writeable/private 表示進程所佔用的私人地址空間大小,也就是該進程實際使用的記憶體大小
shared 表示進程和其他進程共用的記憶體大小

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.