首页 推荐 热点 专题 PHPJavaPythonAndriodIOSC#前端数据库人工智能程序开发架构安全运维资讯微课资源
0
点赞
收藏
分享

微信扫一扫

Linux shell ping脚本

科牛 2022-08-05 阅读 70
linuxshellphpmysqlunityLinux系统/运维


#!/bin/sh
while true
do
ping -c1 -W1 192.168.56.100 > /dev/null
if [[ $? != 0 ]];then
date >> /tmp/`hostname`.ping.out
echo "ping 192.168.56.100 failed." >> /tmp/`hostname`.ping.out
else
date >> /tmp/`hostname`.ping.out
echo "ping 192.168.56.100 success." >> /tmp/`hostname`.ping.out
fi
sleep 1
done

版权声明:本文为博主原创文章,未经博主允许不得转载。

Linux

举报
0 条评论
科牛
关注
  • LLM学习笔记:最好的学习方法是带着问题去寻找答案
  • 浮点数有精度误差,那么怎么看浮点数在内存中存的值是多少
  • hive中mr原理
  • 压力传感器在小型充气泵PCBA方案中起到什么作用?
  • service2019标准版IOS
  • python桌面软件pyqt授权验证
  • 【Python系列】Python 中获取秒级时间戳的实践指南
  • 企业直播间媒体分发新闻转播拉流推广名单(金融财经科技类)
  • 稳定运行的以Azure Synapse Dedicated SQL Pool数据仓库为数据源和目标的ETL性能变差时提高性能方法和步骤
  • springboot+redis+lua实现分布式锁