1、编写清除缓存的脚本 vim /root/drop_cache.sh date sync sync echo 3 >/proc/sys/vm/drop_caches free -g 2、编写crontab定时任务,实现定时调用: crontab -e 添加以下内容:(每5分钟清除一次缓存),并记录日志: */5 * * * * sh drop_cache.sh >> drop_cache.log
文章
阅读量
获赞