天天看點

【一天一個shell指令】好管家-記憶體-free

說明

free 指令顯示系統中剩餘和已用的記憶體資訊

入門執行個體

$free –m 

<a href="http://yjplxq.blog.51cto.com/attachment/201210/26/4081353_1351233936Jccf.png"></a>

解釋:  -b,-k,-m,-g 顯示的輸出分别是 bytes, KB, MB, or GB

$free –l 

<a href="http://yjplxq.blog.51cto.com/attachment/201210/26/4081353_1351233940vPsR.png"></a>

幫助檔案

free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay] [-c count] [-V]

-b,-k,-m,-g

show output in bytes, KB, MB, or GB 

-l

列出low和high記憶體狀态的詳細資訊 

-o

用過去的格式輸出 (no -/+buffers/cache line) 

-t

陳列出RAM+swap全部資訊

-s

延遲n秒後輸出一次

-c

輸出幾次,與-s一起使用 

-V

列印版本資訊

執行個體

$free –c 3 –s1 

如圖所示:

<a href="http://yjplxq.blog.51cto.com/attachment/201210/26/4081353_1351233940oGeB.png"></a>

解釋:記憶體資訊列印三次,間隔1秒

本文轉自 wws5201985 51CTO部落格,原文連結:http://blog.51cto.com/yjplxq/1038004,如需轉載請自行聯系原作者