parent
f5b60f3711
commit
0c76ebd6ff
|
@ -12,6 +12,7 @@
|
|||
| /proc/acpi/thermal_zone/THRM/temperature | x86 CPU Core 温度传感器信息也可能在这个目录 |
|
||||
| /proc/cpuinfo | 可以 cat 的 CPU 信息 |
|
||||
| /proc/meminfo | 可以 cat 的内存信息 |
|
||||
| /proc/sys/vm/drop_caches | Writing to this will cause the kernel to drop clean caches, as well as reclaimable slab objects like dentries and inodes. Once dropped, their memory becomes free. |
|
||||
| /sys/class/gpio | GPIO 设备目录,可导出 GPIO 端口,设置输入输出等 |
|
||||
| /sys/kernel | 系统内核信息 |
|
||||
| /sys/kernel/debug | 系统内核调试信息和接口 |
|
||||
|
|
|
@ -3,5 +3,17 @@
|
|||
Linux 下释放 cache 空间命令如下:
|
||||
|
||||
```bash
|
||||
# 在释放缓存前应该先
|
||||
sync
|
||||
# 手动释放内存
|
||||
echo 3 > /proc/sys/vm/drop_caches
|
||||
# 查看内存是否已经释放
|
||||
free -h
|
||||
```
|
||||
|
||||
drop_caches 的值可以是 0-3 之间的数字,代表不同的含义:
|
||||
|
||||
- 0:不释放(系统默认值)
|
||||
- 1:释放页缓存
|
||||
- 2:释放dentries和inodes
|
||||
- 3:释放所有缓存
|
||||
|
|
Loading…
Reference in New Issue