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

Linux之free命令

时间:2019-05-20 22:59:40      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:-o   查看内存   观察   linu   wap   linux   实例   总数   sha   

free命令可以查看内存使用的相关情况

1、用法

free [选项]

 

2、命令选项

-b   以Byte为单位显示内存使用情况
-k    以KB为单位显示内存使用情况(默认以KB显示)
-m    以MB为单位显示内存使用情况
-g    以GB为单位显示内存使用情况
-h    以合适的单位显示内存使用情况
-o    不显示缓冲区调节列
-s<n>   动态观察内存使用状况,每n秒刷新
-t    显示内存总和列

3、实例

1)查看内存

[root@izwz98rern8nx2xy82intfz /]# free
              total        used        free      shared  buff/cache   available
Mem:        1882232      448528      826408       47592      607296     1203604
Swap:       1049596      129920      919676
[root@izwz98rern8nx2xy82intfz /]# free -m
              total        used        free      shared  buff/cache   available
Mem:           1838         437         807          46         593        1175
Swap:          1024         126         898
[root@izwz98rern8nx2xy82intfz /]# free -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        437M        807M         46M        593M        1.1G
Swap:          1.0G        126M        898M

4、说明

Mem           内存
Swap             虚拟内存
total            内存总数
used                 已经使用的内存数
free                   未分配的内存数
available          可用内存
bbuff/cache     缓存内存数

tatal         =     used + free + buff/cache
available =    free + buff/cache - 不可回收的部分   

Linux之free命令

标签:-o   查看内存   观察   linu   wap   linux   实例   总数   sha   

原文地址:https://www.cnblogs.com/afeige/p/10896885.html

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