码迷,mamicode.com
首页 > 系统相关 > 详细

正确计算linux系统内存使用率

时间:2016-05-11 13:08:39      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:

正确计算linux系统内存使用率

对操作系统来说,Buffers和Cached是已经被使用的(上图Mem:这一行)

MemFree=total-used
314952=24946552-24631600

对应用程序来说(上图对应-/+ buffers/cache那一行)

MemFree=buffers+cached+free
19536392=152116+19069324+314952

[root@dvrdvs bin] # free
              total         used         free       shared      buffers
  Mem:        37820        37316          504            0          704
 Swap:            0            0            0
Total:        37820        37316          504
[root@dvrdvs bin] # cat /proc/meminfo 
MemTotal:          37820 kB
MemFree:             500 kB
Buffers:             704 kB
Cached:            12512 kB
SwapCached:            0 kB
Active:            11516 kB
Inactive:          11176 kB
Active(anon):       9708 kB
Inactive(anon):     8160 kB
Active(file):       1808 kB
Inactive(file):     3016 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          9500 kB
Mapped:             4452 kB
Shmem:              8392 kB
Slab:               6432 kB
SReclaimable:        600 kB
SUnreclaim:         5832 kB
KernelStack:         592 kB
PageTables:          196 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       18908 kB
Committed_AS:      88428 kB
VmallocTotal:     966656 kB
VmallocUsed:       20720 kB
VmallocChunk:     918896 kB
[root@dvrdvs bin] # 

 linux 内存使用情况详细信息

正确计算linux系统内存使用率

标签:

原文地址:http://www.cnblogs.com/jingzhishen/p/5481218.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!