Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to tell ping to show its usual termination statistics without stopping the execution?

For instance, I'd like to quickly view:

--- ping statistics ---
2410 packets transmitted, 2274 received, +27 errors, 5% packet loss, time 2412839ms
rtt min/avg/max/mdev = 26.103/48.917/639.493/52.093 ms, pipe 3

without having to stop the program, thus losing the accumulated data.

share|improve this question
Indeed, as Andreas suggests above, you can use CTRL+\ to get the statistics without quitting ping. – George Dec 6 '14 at 13:23
up vote 16 down vote accepted

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 & jobs ; fg

<... in another terminal ...>


Short statistics look like this:

19/19 packets, 0% loss, min/avg/ewma/max = 0.068/0.073/0.074/0.088 ms
share|improve this answer
One slight addition: You can emit SIGQUIT from the terminal by hitting "Ctrl-\", no need to have a second terminal open and use kill. – Andreas Wiese Jul 11 '14 at 13:51

If your ping does not support a useful SIGQUIT (AIX, Solaris), here's one workaround -- an infinite ping loop where each ping only fires off (e.g.) 10 pings, so that you can see intermediate results.

while :; do ping -c 10 $HOST; done

To stop it, Control-C may only kill the ping command; you may need to suspend and then kill the job (Control-z; kill %).

This of course does not provide true running statistics -- just over the course of those 10 pings.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.