标签:监控
#!/bin/bash
#http://wangjiatong.blog.51cto.com/
#create2016-11-22
ping_success(){
if ping -c 1 $IP >/dev/null; then
echo -e "\033[032m$IP ping issuccessful!!\033[0m"
continue
fi
}
IP_LIST="192.168.217.130192.168.217.142"
for IP in$IP_LIST;
do
ping_success
sleep 1
ping_success
echo -e "\033[031m$IP ping isfailure!\033[0m"
done
本文出自 “勿忘初心” 博客,转载请与作者联系!
标签:监控
原文地址:http://wangjiatong.blog.51cto.com/11834370/1875583