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

[linux] ping服务器脚本

2015-07-03 10:12 573 查看
#!/bin/bash

IP=1.2.3.4
while true; do
echo "**********************************************">>/root/ping_and_time.log
echo `date +%y-%m-%d-%H:%M:%S` >>/root/ping_and_time.log
ping -c 5  $IP >>/root/ping_and_time.log
echo "----------------------------------------------">>/root/ping_and_time.log
sleep 20
done
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: