Jilles posted a small script to show offline/online status based on ping
Posted by jpluimers on 2022/03/16
Jilles posted a small script to show offline/online status based on ping in [Archive.is] Jilles on Twitter: “#!/bin/bash HOST={1ST HOP HERE} while true;do p=$(ping -c1 $HOST) if [ $? -ne 0 ];then s=offline else s=online\ fi echo $(date +%F\ %T) $s – $(echo $p | sed -e ‘s/^PING.*— 1/1/g’) sleep 10 done”
#!/bin/bash HOST={1ST HOP HERE} while true;do p=$(ping -c1 $HOST) if [ $? -ne 0 ];then s=offline else s=online\ fi echo $(date +%F\ %T) $s - $(echo $p | sed -e 's/^PING.*--- 1/1/g') sleep 10 done
The reason was that his ISP had connection problems for the block of homes where Jilles lives.
–jeroen
Leave a Reply