文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>ping检测网络连接

ping检测网络连接

时间:2006-11-20  来源:ghbspecial

#!/bin/sh #20061120 by ghb datefile=`date +%Y%m%d`
pingwt=`ping -c 3 192.168.0.1`
pingdx=`ping -c 3 192.168.0.254`
wt=`ping -c 1 192.168.0.1|grep time|awk '{print $7}'|sed -n 1p|awk -F = '{print $1}'`
dx=`ping -c 1 192.168.0.77|grep time|awk '{print $7}'|sed -n 1p|awk -F = '{print $1}'`
while true  do
   date=`date +%Y%m%d%T`
   if [ $wt != "time" ]
      then
      echo "$date"  >> /root/ping/tracewtfile_$datefile
      echo "$pingwt" >> /root/ping/tracewtfile_$datefile
   fi
   if [ $dx != "time" ]
      then
      echo "$date"  >> /root/ping/tracewtfile_$datefile
      echo "$pingdx" >> /root/ping/tracewtfile_$datefile
   fi
   sleep 10m
 done
 
相关阅读 更多 +
排行榜 更多 +
神殿ios版官网入口

神殿ios版官网入口

角色扮演 下载
邻居不对劲汉化移植版下载

邻居不对劲汉化移植版下载

冒险解谜 下载
神殿ios猜骰子手机版登陆

神殿ios猜骰子手机版登陆

冒险解谜 下载