linux包之procps之pmap命令

來源:互聯網
上載者:User

標籤:io   使用   ar   for   檔案   art   sp   on   c   

名稱:
       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)  裝置名稱

pmap -d 1

pmap -d 1 -q 不顯示頭尾

[[email protected] ~]#  while true; do pmap -d  3066 | tail -1; sleep 2; done  迴圈顯示進程3066的裝置格式的最後1行,間隔2秒,

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

linux包之procps之pmap命令

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.