Linux系统操作


1、内存管理回收

  内存查看:free -m

[root@master kube-prometheus]# free -m
              total        used        free      shared  buff/cache   available
Mem:           1819         332         881          10         605        1333
Swap:             0           0           0

  内存回收:echo 1 > /proc/sys/vm/drop_caches

[root@master kube-prometheus]# free -m
              total        used        free      shared  buff/cache   available
Mem:           1819         333         880          10         605        1333
Swap:             0           0           0
[root@master kube-prometheus]# echo 1 > /proc/sys/vm/drop_caches
[root@master kube-prometheus]# free -m
              total        used        free      shared  buff/cache   available
Mem:           1819         341        1414          10          62        1368
Swap:             0           0           0