标签:
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
linux 监控系统剩余内存大小
原文地址:http://www.cnblogs.com/ytfcz/p/5188467.html