千家信息网

如何知道远程的机器是否宕机

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,#!/bin/bashmail=2422606568@qq.comwhile true do ping -c 2 >/dev/null 2>&1 if [ $? -ne 0 ];then
千家信息网最后更新 2025年02月01日如何知道远程的机器是否宕机
#!/bin/bashmail=2422606568@qq.comwhile true   do ping -c 2  >/dev/null 2>&1   if [ $? -ne 0 ];then     echo " |mail-s "ping baidu is down" $mail     else      echo "baidu is ok"      fi;      sleep 30      done


0