linux 查看内存信息

cat /proc/meminfo
MemTotal:        4048148 kB
MemFree:          204668 kB
Buffers:          157152 kB
Cached:           876772 kB
SwapCached:            0 kB
Active:          3195268 kB
Inactive:         385828 kB
Active(anon):    2594336 kB
Inactive(anon):    19544 kB
Active(file):     600932 kB
Inactive(file):   366284 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                52 kB
Writeback:             0 kB
AnonPages:       2547172 kB
Mapped:            65276 kB
Shmem:             66708 kB
Slab:             200808 kB
SReclaimable:     176280 kB
SUnreclaim:        24528 kB
KernelStack:        2696 kB
PageTables:        12376 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2024072 kB
Committed_AS:    3010564 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       20216 kB
VmallocChunk:   34359702264 kB
HardwareCorrupted:     0 kB
AnonHugePages:   2119680 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       65408 kB
DirectMap2M:     4128768 kB
DirectMap1G:     2097152 kB
    MemTotal: 所有可用RAM大小 (即物理内存减去一些预留位和内核的二进制代码大小)

     MemFree: LowFree与HighFree的总和,被系统留着未使用的内存

     Buffers: 用来给文件做缓冲大小

      Cached: 被高速缓冲存储器(cache memory)用的内存的大小(等于 diskcache minus SwapCache ).

  SwapCached: 被高速缓冲存储器(cache memory)用的交换空间的大小

              已经被交换出来的内存,但仍然被存放在swapfile中。用来在需要的时候很快的被替换而不需要再次打开I/O端口。

      Active: 在活跃使用中的缓冲或高速缓冲存储器页面文件的大小,除非非常必要否则不会被移作他用.

    Inactive: 在不经常使用中的缓冲或高速缓冲存储器页面文件的大小,可能被用于其他途径.

   HighTotal:

    HighFree: 该区域不是直接映射到内核空间。内核必须使用不同的手法使用该段内存。

    LowTotal:

     LowFree: 低位可以达到高位内存一样的作用,而且它还能够被内核用来记录一些自己的数据结构。Among many

              other things, it is where everything from the Slab is

              allocated.  Bad things happen when you're out of lowmem.

         

   SwapTotal: 交换空间的总大小

    SwapFree: 未被使用交换空间的大小

    Dirty: 等待被写回到磁盘的内存大小。

   Writeback: 正在被写回到磁盘的内存大小。

   AnonPages:未映射页的内存大小
  
   Mapped: 设备和文件等映射的大小。
  
   Slab: 内核数据结构缓存的大小,可以减少申请和释放内存带来的消耗。

   SReclaimable:可收回Slab的大小

   SUnreclaim:不可收回Slab的大小(SUnreclaim+SReclaimable=Slab)

   PageTables:管理内存分页页面的索引表的大小。

   NFS_Unstable:不稳定页表的大小

   Bounce:

 CommitLimit: Based on the overcommit ratio ('vm.overcommit_ratio'),

              this is the total amount of  memory currently available to

              be allocated on the system. This limit is only adhered to

              if strict overcommit accounting is enabled (mode 2 in

              'vm.overcommit_memory').

              The CommitLimit is calculated with the following formula:

              CommitLimit = ('vm.overcommit_ratio' * Physical RAM) + Swap

              For example, on a system with 1G of physical RAM and 7G

              of swap with a `vm.overcommit_ratio` of 30 it would

              yield a CommitLimit of 7.3G.

              For more details, see the memory overcommit documentation

              in vm/overcommit-accounting.

             

Committed_AS: The amount of memory presently allocated on the system.

              The committed memory is a sum of all of the memory which

              has been allocated by processes, even if it has not been

              "used" by them as of yet. A process which malloc()'s 1G

              of memory, but only touches 300M of it will only show up

              as using 300M of memory even if it has the address space

              allocated for the entire 1G. This 1G is memory which has

              been "committed" to by the VM and can be used at any time

              by the allocating application. With strict overcommit

              enabled on the system (mode 2 in 'vm.overcommit_memory'),

              allocations which would exceed the CommitLimit (detailed

              above) will not be permitted. This is useful if one needs

              to guarantee that processes will not fail due to lack of

              memory once that memory has been successfully allocated.

VmallocTotal: 可以vmalloc虚拟内存大小

VmallocUsed: 已经被使用的虚拟内存大小。

VmallocChunk: largest contigious block of vmalloc area which is free

项目名 说明
MemTotal 所有可用的 RAM 大小,物理内存减去预留位和内核使用
MemFree LowFree + HighFree
Buffers 用来给块设备做缓存的大小(文件系统的 metadata, tracking in-flight pages)
Cached 文件的缓冲区大小
SwapCached 已经被交换出来的内存。与 I/O 相关
Active 经常(最近)被使用的内存
Inactive 最近不常使用的内存。这很容易被系统移做他用
Active(anon) ?
Inactive(anon) ?
Unevictable ?
Mlocked ?
HighTotal 所有在 860MB(0x35C00000)以上的空间。主要是用户空间程序或缓存页
LowTotal 860MB 以下的空间。如果该空间用完了,系统可能会异常
HighFree 860MB 以上空间的可用空间
LowFree 860MB 以下空间的可用空间
SwapTotal 交换空间总和
SwapFree RAM 暂存在 Swap 中的大小
Dirty 等待写回的数据大小
WriteBack 正在写回的数据大小
Mapped 映射文件大小
AnonPages 映射到用户空间的非文件页表大小
Shmem ?
Slab 内核数据结构缓存
SReclaimable Slab 的一部分。当内存压力大时,可以 reclaim
SUnreclaim 不可以 reclaim 的 Slab
KernelStack ?
PageTables 最底层的页表的内存空间
NFS_Unstable 已经发给 NFS 服务器、但是尚未被确认(committed)写入到稳定存储的页表
Bonce ?
WritebackTmp Memory used by FUSE for temporary writeback buffers
CommitLimit CommitLimit = (‘vm.overcommit_ratio’ * Physical RAM)
Committed_AS The amount of memory presently allocated on the system.(系统中目前分配了的内存?)
VmallocTotal vmalloc 内存大小
VmallocUsed 已被使用的虚拟内存大小
VmallocChunk 在 vmalloc 区域中可用的最大的连续内存块的大小
赞 (0) 打赏

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏