Public bug reported:

Hi,

Total ping time is not correct :

# ping -c 3 -i 2 IP
PING IP (IP) 56(84) bytes of data.
64 bytes from IP: icmp_seq=1 ttl=252 time=1.43 ms
64 bytes from IP: icmp_seq=2 ttl=252 time=0.686 ms
64 bytes from IP: icmp_seq=3 ttl=252 time=0.725 ms

--- IP ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4000ms


This should report :
time in ms for first ping answer
+
2000 ms wait time
+
time in ms for second ping answer
+
2000 ms wait time
+
time in ms for third ping answer

So in the example I give, this should report 4002,841ms or 4003 ms
(rounded up).


This reports 4000 ms or sometime 4001 ms or 4002 ms, but never the exact total 
I wrote above.

Leaving -i to default (1) has the same behavior.

Using -c 1 should make the total = time for icmp_seq=1, but :

# ping -c 1 IP
PING IP (IP) 56(84) bytes of data.
64 bytes from IP: icmp_seq=1 ttl=252 time=1.39 ms

--- IP ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms


There must be a int() somewhere that don't coun't decimals ?


This is revelant as I use this for a ttl ping script and need to extract the 
total ping time ( = total displayed ping time - ( ( paquet count  - 1 ) * 
interval ) )


# lsb_release -rd
Description:    Ubuntu 10.04.1 LTS
Release:        10.04

# apt-cache policy iputils-ping
iputils-ping:
  Installed: 3:20071127-2ubuntu1
  Candidate: 3:20071127-2ubuntu1
  Version table:
 *** 3:20071127-2ubuntu1 0
        500 http://fr.archive.ubuntu.com/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status

** Affects: iputils (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/707861

Title:
  Ping statistics total time is incorrect

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to