Check ping statistics without stopping
From the ping
manpage (emphasis mine):
When the specified number of packets have been sent (and received) or if the program is terminated with a SIGINT, a brief summary is displayed. Shorter current statistics can be obtained without termination of process with signal SIGQUIT.
So this will work if you're fine with your stats being slightly less verbose:
# the second part is only for showing you the PID
ping 8.8.8.8 & jobs ; fg
<... in another terminal ...>
kill -SIGQUIT $PID
Short statistics look like this:
19/19 packets, 0% loss, min/avg/ewma/max = 0.068/0.073/0.074/0.088 ms
There is one more easy way to get the ping statistics durning it's execution: Just press Ctrl + | (vertical slash or it's also called pipe line)
I do personally use it very often, try it:
64 bytes from 192.168.1.1: icmp_seq=6 ttl=64 time=0.893 ms
64 bytes from 192.168.1.1: icmp_seq=23 ttl=64 time=0.862 ms
64 bytes from 192.168.1.1: icmp_seq=24 ttl=64 time=3.18 ms
64 bytes from 192.168.1.1: icmp_seq=35 ttl=64 time=0.877 ms
64 bytes from 192.168.1.1: icmp_seq=36 ttl=64 time=0.866 ms
**36/36 packets, 0% loss, min/avg/ewma/max = 0.832/0.993/0.930/3.185 ms**
64 bytes from 192.168.1.1: icmp_seq=37 ttl=64 time=0.909 ms
64 bytes from 192.168.1.1: icmp_seq=38 ttl=64 time=2.03 ms
64 bytes from 192.168.1.1: icmp_seq=39 ttl=64 time=0.839 ms
64 bytes from 192.168.1.1: icmp_seq=40 ttl=64 time=0.880 ms
Try Ctrl+4
It shows a line like this:
312/312 packets, 0% loss, min/avg/ewma/max = 0.312/1.236/0.505/208.655 ms