14.記憶體工具free;vmstat;iostat;pmap;

來源:互聯網
上載者:User

標籤:記憶體資訊   系統   upload   技術分享   waiting   rtu   tin   imageview   https   

記憶體空間使用狀態

free [OPTION]
  • -b 以位元組為單位
  • -m 以MB為單位
  • -g 以GB為單位
  • -h 易讀格式
  • -o 不顯示* -/+buffers/cac
  • -t 顯示RAM + swap的總
  • -s n 重新整理間隔為n秒
  • -c n 重新整理n次後即退出


***

vmstat命令:虛擬記憶體資訊
  • vmstat [options] [delay [count]]
  • vmstat 2 5
procs:
  • r:可運行(正運行或等待運行)進程的個數,和核心數有關
  • b:處於不可中斷睡眠態的進程個數(被阻塞的隊列的長度)

    memory:
  • swpd: 交換記憶體的使用總量
  • free:空閑實體記憶體總量
  • buffer:用於buffer的記憶體總量
  • cache:用於cache的記憶體總量

    swap:
  • si:從磁碟交換進記憶體的資料速率(kb/s)
  • so:從記憶體交換至磁碟的資料速率(kb/s)

    io:
  • bi:從塊裝置讀入資料到系統的速率(kb/s)
  • bo: 儲存資料至塊裝置的速率

    system:
  • in: interrupts 中斷速率,包括時鐘
  • cs: context switch 進程切換速率

    cpu:
  • us:Time spent running non-kernel code
  • sy: Time spent running kernel code
  • id: Time spent idle. Linux 2.5.41前,包括IO-wait time.
  • wa: Time spent waiting for IO. 2.5.41前,包括in idle.
  • st: Time stolen from a virtual machine. 2.6.11前, unknown.

    選項:
  • -s: 顯示記憶體的統計資料

iostat:統計CPU和裝置IO資訊
  • 樣本:iostat 1 10
pmap命令:進程對應的記憶體映射
  • pmap [options] pid [...]
  • -x: 顯示詳細格式的資訊
  • 樣本:pmap 1
另外一種實現:
  • cat /proc/PID/maps

14.記憶體工具free;vmstat;iostat;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.