I'm continuously retrieving data from a remote sensor connected over Ethernet via a switch. I see that about twice per hour, the connection breaks down for a couple of seconds.
I know that the remote sensor doesn't reboot (it would log this), but I can't ping it anymore. Now I need to know if my connection to the Ethernet switch breaks down, or if it's the network connection of the sensor.
Any idea how?
$?
) or use it directly. In a one line bashwhile : ; do ping -c 1 ip_sensor || ping -c 8.8.8.8 && echo " Sensor Down" || echo " Internet down" ; sleep 1s; done
. Translate it for windows or use a bash under windows (cygwin, native if win 10, virtual machine [ok the last one too much :-) ]).