cur_free = `free -m | awk '/buffers\// {print $NF}'`
chars="current memory is $cur_free."
if [ $cur_free -lt 100 ]
echo $chars | mail -s "$chars" fczit@qq.com // 可以改成调用http接口,即发邮件又发短信报警
fi
cur_free = `free -m | awk '/buffers\// {print $NF}'`
chars="current memory is $cur_free."
if [ $cur_free -lt 100 ]
echo $chars | mail -s "$chars" fczit@qq.com // 可以改成调用http接口,即发邮件又发短信报警
fi
转载于:https://www.cnblogs.com/ytfcz/p/5188467.html