linux内存和swap
2014-04-04 16:29
260 查看
# sync && echo 3 >/proc/sys/vm/drop_caches && sleep 2 && echo 0 >/proc/sys/vm/drop_caches
free -m
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
各参数含义:
1: total:总物理内存
2: used:已使用内存
3: free:完全未被使用的内存
4: shared:应用程序共享内存
5: buffers:缓存,主要用于目录方面,inode值等
6: cached:缓存,用于已打开的文件
7: -buffers/cache:应用程序使用的内存大小,used减去缓存值
8: +buffers/cache:所有可供应用程序使用的内存大小,free加上缓存值
9: 其中:
10: total = used + free
11: -buffers/cache=used-buffers-cached,应用程序真实使用的内存大小
12: +buffers/cache=free+buffers+cached,服务器真实还可利用的内存大小
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
Writing to this file causes the kernel to drop clean caches,dentries and inodes from memory, causing that memory to becomefree. To free pagecache, use echo 1 > /proc/sys/vm/drop_caches; to free dentries and inodes, use echo 2 > /proc/sys/vm/drop_caches; to free pagecache, dentries and inodes, use echo 3 >/proc/sys/vm/drop_caches. Because this is a non-destructive operation and dirty objects are not freeable, the user should run sync first.
转自 http://www.linuxidc.com/Linux/2012-04/58184.htm
相关文章推荐
- Linux入侵检测之AIDE
- 红帽子Linux6.5 X86_64 自动重启解决办法
- centos yum命令报错
- Linux中10个有用的命令行补齐命令
- Linux下LDAP Server/Client配置 --OpenLDAP
- 一些linux下的函数说明
- Linux 添加分区
- linux的regular expression特殊符号
- linux下perforce命令行客户端使用
- Linux 上的 MAC 地址欺骗
- Linux yum apt-get 方式
- linux下IPTABLES配置详解
- Linux基础(九)--定时任务
- linux乱码问题
- linux find用法整理
- 在linux下生成可执行文件和库文件
- root登录linux图形界面,提示验证失败
- Linux 如何确定文件内容
- git / ssh 不用每次都输入密码的方法
- Linux监控工具vmstat命令详解