linux 监控系统剩余内存大小

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

posted @ 2016-02-13 23:49  coreWars  阅读(328)  评论(0编辑  收藏  举报