free - Linux tools 2 of n

"free" is used to check the system's memory information.

Let's understand its output.

sysadmin@ubuntu:~$ free
                 total             used            free           shared    buffers     cached
Mem:       2047900    1169720     878180          0          87280     951716
-/+ buffers/cache:      130724       1917176
Swap:      2094076          0            2094076

The second line (Mem:)
total 2047900:  is the total physical memory in the system (subtracts some overhead)
used 1169720: is the used physical memory in the system 
free 878180: is the free physical memory in the system

total = used + free

buffers 87280: buffer memory (usually used by kernel for block io etc and usually is relative small). Can be freed by kernel if usable physical memory is really low.
cached 951716: disk data page cached in memory. Can be freed by kernel if usable physical memory is really low.

The third line (-/+ buffers/cache:)
used 130724 = (used 1169720  - buffers 87280 - cached  951716) in the second (Mem:) line (this is why it is using "-"  in "-/+ buffers/cache")
free 1917176 = (free 878180 + buffers 87280 + cached  951716)  in the second (Mem:) line (this is why it is using "+"  in "-/+ buffers/cache")
"buffers and cached" is potentially able to be recycled, this is why free count them as free.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值