New answers tagged ping
You may find the answer by following this link: https://forum.openwrt.org/viewtopic.php?id=59900
You should add direct route to Windows subnet that is detected. Try adding such a route to address 10.0.0.0/8 directly on eth0: ip r add 10.0.0.0/8 dev eth0 Then verify the kernel knows where to go: ip r get 10.0.0.1 and try pinging again. BTW 08:00:27 part of MAC shows someone running VirtualBox on the machine or something like that.
This runs indefinitely, never restarts ping, ping prints stats periodically (adjust the sleep in the following code). Bash is optional this is /bin/sh compatible. You can kill this with CTRL-C or SIGHUP, SIGINT, SIQUIT, or SIGTERM. #!/bin/sh trap 'kill -TERM $! 2>/dev/null; exit' HUP INT QUIT TERM while true; do ( ping localhost ...
By default, tee command stop writing and closes the file after receive the signal to stop (a Ctlr-C, sent by timeout command). Just add the option -i to tee and have fun. Example: #!/bin/bash while true; do timeout -s 2 1h ping 18.104.22.168 | ts '%Y-%m-%d~%H:%M:%S' | tee -i ping_$(date +'%Y-%m-%d_%H.%M.%S').log done
Add the --foreground option to yout timeout command as ping seems to test that it is being used on a tty to setup signal handling. Or simply stop using timeout and ask ping to stop after 60*60 seconds: ping -w 3600 22.214.171.124 For your new question, ignore the signals in the rest of your pipe: #!/bin/bash ping -w 3600 126.96.36.199 | ( trap ...
Top 50 recent answers are included