檢查記憶體並重新開機

有時候會遇到 “Out of memory” 的問題 想重開機 用一行指令解決

# flag=`dmesg |grep "Out of memory"| wc -l`; if test $flag -ge 1; then reboot; fi

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.