标签:内存监控
# free -m |awk ‘NR==3 {print $NF}‘
4012
#!/bin/bash 脚本
used_mem=`free -m |awk ‘NR==3 {print$NF}‘`
if [ $used_mem -lt 5000]
then
echo"mem is not enough,$used_mem."
echo"mem is not enough,$used_mem."|mail -s "mem warning $(data +%F)"qq@qq.com #发邮件
fi
本文出自 “通通的技术博客” 博客,转载请与作者联系!
标签:内存监控
原文地址:http://wangjiatong.blog.51cto.com/11834370/1873200