您的位置:首页 > 运维架构 > Shell

shell脚本邮件报警-web

2013-09-06 11:53 211 查看
#!/bin/bash
#mon.sh
######web monitor##################
/usr/bin/nc localhost 80 -w 3 & >/dev/null
h='echo $?'
if [$h -ne 0]
then
etho "httpd is down " | mail -s "web monitor" admin@lamp.com
fi

本文出自 “阮胜昌的技术博客” 博客,谢绝转载!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: