I'm trying to make a script that save the ping
logs to .txt or .log file.
To monitor if my connection is intermittent or not, I'm using this script:
$nohup ping 8.8.8.8 > timeout.txt &
Then when I check if its pinging:
$tailf timeout.txt
It's working! But when I stop the process by using:
$kill (process)
timeout.txt file is stop pinging but didn't show the statistic logs if I had any timeout or packet loss.
How to stop the ping
and also showing the statistic?
Or do I have to add a script to my script?
SIGINFO
. You can also pressCtrl-T
if the process is in the foreground (orCtrl-\
forSIGQUIT
OSes). – Eric Boehs Jan 28 '15 at 05:28