LINUX 自动释放内存-CRONTAB 中的SHELL定时
这几天发现linux系统内存一直涨,即使把apache和mysql关闭了,内存也不释放,可以使用以下脚本来释放内存:
脚本内容:
#! /bin/bash # cache释放: # To free pagecache: sync sync #echo 1 > /proc/sys/vm/drop_caches # To free dentries and inodes: #echo 2 > /proc/sys/vm/drop_caches # To free pagecache, dentries and inodes: echo 3 > /proc/sys/vm/drop_caches
浙公网安备 33010602011771号