Linux之free命令

free命令能够查看内存使用的相关状况缓存

一、用法spa

free [选项]

 

二、命令选项code

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

三、实例内存

1)查看内存class

[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

四、说明sed

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

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

相关文章
相关标签/搜索