server ping down 脚本检查
最近由于网络等原因,不知道server 是否真的down 了,搞得人心惶惶的。想搞个脚本来批量检查一下: 思想如下:
1: ping server : if has reply message, then using command: uptime, to check
2: if "uptime" > 1 day, the reply message: "server works normally"
3: if "ping " server no reply, then reply message: "server is down".
大神帮忙看看,帮忙搞个脚本,可以的马上给分,thank a lot.