Sven Eckelmann wrote:
Daniel Seither wrote:
Fixes the calculation of the mean absolute deviation (mdev) of the roundtrip times. mdev was previously calculated by computing the difference of maximum and minimum round trip times.
The calculation is now done using the same formula as in the iputils ping program.
Signed-off-by: Daniel Seither post@tiwoc.de
Acked-by: Sven Eckelmann sven.eckelmann@gmx.de
Ok, have a small suggestion. Please check that mdev - ... is positive. Otherwise we would have something like (mdev - avg * avg == -0.000....., sqrt(...) == NaN):
PING 02:00:00:00:00:02 (02:00:00:00:00:02) 19(47) bytes of data 19 bytes from 02:00:00:00:00:02 icmp_seq=1 ttl=50 time=0.10 ms --- 02:00:00:00:00:02 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss rtt min/avg/max/mdev = 0.101/0.101/0.101/nan ms
Best regards, Sven