Chinaunix首页 | 论坛 | 博客
  • 博客访问: 356046
  • 博文数量: 163
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 356
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-01 14:18
文章分类

全部博文(163)

文章存档

2020年(4)

2019年(5)

2018年(4)

2017年(15)

2016年(11)

2015年(10)

2014年(4)

2013年(8)

2012年(13)

2011年(23)

2010年(2)

2009年(16)

2008年(20)

2007年(13)

2006年(12)

2005年(3)

分类:

2008-10-24 18:33:52

 

free

  free 命令相对于top 提供了更简洁的查看系统内存使用情况:

  $ free

  # free
   total used free shared buffers cached
  Mem: 255988 231704 24284 0 6432 139292
  -/+ buffers/cache: 85980 170008
  Swap: 746980 0 746980

  Mem:表示物理内存统计

  -/+ buffers/cached:表示物理内存的缓存统计

  Swap:表示硬盘上交换分区的使用情况,这里我们不去关心。

  系统的总物理内存:255268Kb(256M),但系统当前真正可用的内存b并不是第一行free 标记的 16936Kb,它仅代表未被分配的内存。

  我们使用total1、used1、free1、used2、free2 等名称来代表上面统计数据的各值,1、2 分别代表第一行和第二行的数据。

  total1:表示物理内存总量。
  used1:表示总计分配给缓存(包含buffers 与cache )使用的数量,但其中可能部分缓存并未实际使用。
  free1:未被分配的内存。
  shared1:共享内存,一般系统不会用到,这里也不讨论。
  buffers1:系统分配但未被使用的buffers 数量。
  cached1:系统分配但未被使用的cache 数量。buffer 与cache 的区别见后面。
  used2:实际使用的buffers 与cache 总量,也是实际使用的内存总量。
  free2:未被使用的buffers 与cache 和未被分配的内存之和,这就是系统当前实际可用内存。

  可以整理出如下等式:

   total1 = used1 + free1
   total1 = used2 + free2
   used1 = buffers1 + cached1 + used2
   free2 = buffers1 + cached1 + free1

  buffer 与cache 的区别

 
 A buffer is something that has yet to be "written" to disk. A cache is
something that has been "read" from the disk and stored for later use.
阅读(1410) | 评论(0) | 转发(0) |
0

上一篇:vmware 时间同步问题

下一篇:spine 安装

给主人留下些什么吧!~~