美文网首页
ping网络检测

ping网络检测

作者: 阿汤哥_8d27 | 来源:发表于2023-10-09 10:33 被阅读0次
nohup ping baidu.com | awk '{ print strftime("%Y-%m-%d %H:%M:%S",systime())"\t" $0; fflush() }' >> baidu_ping.txt &
[root@dev6 ping]# tail -f baidu_ping.txt 
2023-10-10 10:32:19 64 bytes from 39.156.66.10: icmp_seq=470 ttl=49 time=31.8 ms
2023-10-10 10:32:20 64 bytes from 39.156.66.10: icmp_seq=471 ttl=49 time=31.3 ms
2023-10-10 10:32:21 64 bytes from 39.156.66.10: icmp_seq=472 ttl=49 time=31.5 ms


nohup ping 192.168.0.1 | awk '{ print strftime("%Y-%m-%d %H:%M:%S",systime())"\t" $0; fflush() }' >> net_ping.txt &

参考文档&链接

  1. [https://blog.csdn.net/qq_38269618/article/details/128640473](ping添加时间输出)

相关文章

网友评论

      本文标题:ping网络检测

      本文链接:https://www.haomeiwen.com/subject/tfjibdtx.html