1

I'm on OS X 10.7 and just found out, the

ping -s 10 host

does not work as expected. Its output does not contain the round trip time:

PING host (IP): 10 data bytes
18 bytes from IP: icmp_seq=0 ttl=248
18 bytes from IP: icmp_seq=1 ttl=248
^C
--- host ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss

It works if -s's value is 16 and above. I also experienced this on Linux, but with a smaller value. I read man ping, but it does not mention a restriction.

bot47
  • 327

1 Answers1

3

With packet sizes that small, there's not enough room in the packet to hold the timestamp.

David Schwartz
  • 31,609
  • 2
  • 56
  • 85
  • This can't really be the answer, as: 1) The RTT could also be derived from the ICMP identifier, and 2) I tested that even size 8 contains a timestamp, but the ping command does not show the RTT though – bot47 Feb 17 '12 at 10:48
  • That timestamp is not accurate enough to display a meaningful RTT measurement. And while the RTT could be derived from the ICMP identifier, it isn't. – David Schwartz Feb 17 '12 at 10:58
  • Thanks, I just had a look at busybox source. It's a shame, I look into patching it. – bot47 Feb 17 '12 at 11:01