free -m 内存

    查看内存及交换swap分区大小及使用率

man  free

NAME
       free - Display amount of free and used memory in the system

SYNOPSIS
       free [-b | -k | -m] [-o] [-s delay ] [-t] [-l] [-V]

DESCRIPTION
       free  displays  the total amount of free and used physical and swap memory
       in the system, as well as the buffers used by the kernel.  The shared mem-
       ory column should be ignored; it is obsolete.

   Options
       The  -b  switch displays the amount of memory in bytes; the -k switch (set
       by default) displays it  in  kilobytes;  the  -m  switch  displays  it  in
       megabytes.

       The -t switch displays a line containing the totals.

       The -o switch disables the display of a "buffer adjusted" line.  If the -o
       option is not specified, free subtracts buffer memory from the used memory
       and adds it to the free memory reported.

       The  -s  switch  activates continuous polling delay seconds apart. You may
       actually specify any floating point number for delay,  usleep(3)  is  used
       for microsecond resolution delay times.

       The -l switch shows detailed low and high memory statistics.

       The -V switch displays version information.

FILES
       /proc/meminfo-- memory information

free   -m  -s   6    ###每隔6s输出一次 

[root@VM_0_3_centos ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          3830       3723        107          0        240       1604
-/+ buffers/cache:       1878       1952
Swap:            0          0          0

 计算方式

191272k total  物理内存总量 
173656k used  使用的物理内存总量 
17616k free  空闲内存总量 

total =  userd + free
22052k buffers  用作内核缓存 的内存量 
123988k cached  缓冲的交换区总量。
-/+buffters/cache-userd =  mem-userd  - buffters - cached

swap  交换分区信息

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值