pings.in Menu

Ping on a Mac

Mac ping sends ICMP echo requests source and keeps going until interrupted, unless -c gives a count source. ping -c 4 8.8.8.8 sends four, then a summary.

Which options does it take?

-c count
How many; without it, ping runs until interrupted. source
-i wait
Seconds between pings; one if not set. source
-s packetsize
Data bytes in each; 56 if not set. source
-t timeout
Seconds before ping stops, replies or not. source
-W waittime
Milliseconds to wait for each reply. source

Is -W the same as on Linux?

No. On a Mac -W is milliseconds source; on Linux it is seconds source. A script moved between the two waits a thousand times longer or shorter.

What does the summary show?

When the count is reached, or ping is stopped with SIGINT, it shows how many were sent and received, and the lowest, mean, highest and standard deviation of the round trips source.

What should I type?

ping -c 4 8.8.8.8
ping -c 10 -i 0.5 1.1.1.1
ping -t 30 9.9.9.9

Four pings; ten, half a second apart; and pings for 30 seconds. We have not run these on a Mac: the options are quoted from the ping manual in Apple’s open-source network_cmds.