Irritation regarding precision of ping(8)...
From: Sean Chittenden (sean_at_chittenden.org)
Date: 10/31/04
- Previous message: Robert Watson: "Re: Bridge--using Packet Capture Library(libpcap.a) -- efficiency ?????"
- Next in thread: Chuck Swiger: "Re: Irritation regarding precision of ping(8)..."
- Reply: Chuck Swiger: "Re: Irritation regarding precision of ping(8)..."
- Reply: Bruce Evans: "Re: Irritation regarding precision of ping(8)..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: freebsd-net@freebsd.org Date: Sun, 31 Oct 2004 01:47:51 -0800
This has long bugged me and tonight I finally snapped and had to do
something about it. Example output:
64 bytes from a.b.c.d: icmp_seq=935 ttl=126 time=33.824 ms
64 bytes from a.b.c.d: icmp_seq=936 ttl=126 time=29.138 ms
64 bytes from a.b.c.d: icmp_seq=937 ttl=126 time=28.262 ms
64 bytes from a.b.c.d: icmp_seq=938 ttl=126 time=29.67 ms
64 bytes from a.b.c.d: icmp_seq=939 ttl=126 time=30.963 ms
64 bytes from a.b.c.d: icmp_seq=940 ttl=126 time=30.283 ms
64 bytes from a.b.c.d: icmp_seq=941 ttl=126 time=29.455 ms
The source of irritation being line seq 930. The time should be 29.670
since we are accurately measuring the precision to the thousands place.
On a less scientific basis (and the actual reason this bothered me),
not having the trailing zero disrupts the continuity of a stream of
ping times. The attached patch simply fixes the various formatting
statements introduced in version 1.2(!!!!) to use %.30f instead of
%.3f. It's now possible to see '28.200' ms ping times instead of just
'28.2 ms'.
Anyone mind if I commit the attached patch? I'm sure I'm not the only
one who's wanted to commit the following. -sc
-- Sean Chittenden
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
- text/plain attachment: patch.txt
- Previous message: Robert Watson: "Re: Bridge--using Packet Capture Library(libpcap.a) -- efficiency ?????"
- Next in thread: Chuck Swiger: "Re: Irritation regarding precision of ping(8)..."
- Reply: Chuck Swiger: "Re: Irritation regarding precision of ping(8)..."
- Reply: Bruce Evans: "Re: Irritation regarding precision of ping(8)..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|