环境
问题
解决方案
$ free
total used free shared buffers cached
Mem: 2033528 1404468 629060 0 53308 786040
-/+ buffers/cache: 565120 1468408
Swap: 2621432 152 2621280
每列表示以下内容:
total | used | free | shared | buffers | cached | |
Mem: | 总物理内存大小 | 已用物理内存大小(包括缓冲区 + 缓存) | 可用物理内存大小 | 不适用 | 总物理内存大小的已用缓冲区缓存 | 使用的总物理内存大小的页面缓存 |
-/+ buffers/cache: | 已用物理内存 - (缓冲区+缓存) | 可用物理内存+(缓冲区+缓存) | ||||
Swap: | 总交换大小 | 已用交换大小 | 可用交换大小 |
** Physically Used Memory = Actual used memory + buffers + cache
** Physically Free Memory = Total Physical Memory - Actual used memory - buffers - cache
** Memory free for Applications = Total Physical Memory - Actual used memory
** Memory used by Applications = Physically Used Memory - buffers - cache
top - 17:40:56 up 9:09, 3 users, load average: 0.05, 0.15, 0.17
Tasks: 218 total, 2 running, 215 sleeping, 0 stopped, 1 zombie
Cpu(s): 2.0%us, 0.0%sy, 0.0%ni, 98.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 2970624k total, 1919160k used, 1051464k free, 247024k buffers
Swap: 2048276k total, 0k used, 2048276k free, 880556k cached
$ free -s 1 -c 3
total used free shared buffers cached
Mem: 2033528 1701120 332408 0 58056 1056996
-/+ buffers/cache: 586068 1447460
Swap: 2621432 152 2621280
total used free shared buffers cached
Mem: 2033528 1701144 332384 0 58056 1056996
-/+ buffers/cache: 586092 1447436
Swap: 2621432 152 2621280
total used free shared buffers cached
Mem: 2033528 1701144 332384 0 58056 1056996
-/+ buffers/cache: 586092 1447436
Swap: 2621432 152 2621280
$ sar -r 1 3
Linux 2.6.18-164.2.1.el5 (server1) 11/26/09
18:46:19 kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused kbswpcad
18:46:20 331264 1702264 83.71 58648 1057216 2621280 152 0.01 148
18:46:21 331248 1702280 83.71 58648 1057216 2621280 152 0.01 148
18:46:22 331248 1702280 83.71 58648 1057216 2621280 152 0.01 148
Average: 331253 1702275 83.71 58648 1057216 2621280 152 0.01 148
FREE(1) (`man free`)
SAR(1) (`man sar`)
/proc/meminfo ('man 5 proc')
根源