Linuxでメモリ開放スクリプトコード

#vi /opt/free.sh

#!/bin/bash
sync
free -m |grep -i mem |awk '{if($4 < 400){ printf(“3") > “/proc/sys/vm/drop_caches"}}’;

crontab -e
20 * * * * /opt/free.sh

Linux

Posted by arkgame