If -p less than RTT there is no response captured
Marsupilani opened this issue · comments
As you can see in the examples there seems to be a problem with the detection of the results is the period is less then the RTT. It seems -p do more work like a timeout for responses, then a wait between ping. Or there is a problem to detect the 'old' reponse after the new was sent...
root@cloud ~ # fping -u -C5 -p100 -e www.nasa.gov
www.nasa.gov : 15.0 14.6 14.6 14.6 14.7
root@cloud ~ # fping -u -C5 -p10 -e www.nasa.gov
www.nasa.gov : - - - - -
root@cloud ~ # fping -u -C5 -p20 -e www.nasa.gov
www.nasa.gov : 14.9 14.7 14.8 14.7 14.8
root@cloud ~ # fping -u -C5 -p15 -e www.nasa.gov
www.nasa.gov : - 15.0 - - -
root@cloud ~ # fping -u -C5 -p15 -e www.nasa.gov
www.nasa.gov : - 15.0 15.0 - -
root@cloud ~ # fping -u -C5 -p15 -e www.nasa.gov
www.nasa.gov : 15.0 - - 15.0 -
root@cloud ~ # fping -u -C5 -p15 -e www.nasa.gov
www.nasa.gov : 14.9 - 14.9 14.9 14.9
root@cloud ~ # fping -u -C5 -p16 -e www.nasa.gov
www.nasa.gov : 15.0 14.8 15.7 14.9 15.1
root@cloud ~ # fping -u -C5 -p10 -e 8.8.8.8
8.8.8.8 : 4.21 3.86 3.91 4.03 4.10
root@cloud ~ # fping -u -C5 -p10 -e 9.9.9.9
9.9.9.9 : - - - - -
root@cloud ~ # fping -u -C5 -p20 -e 9.9.9.9
9.9.9.9 : 14.5 14.7 17.2 14.5 14.6
The test were done under Linux 5.10.0-18-amd64 (debian 11) with fping 5.0-1 from the distribution.
same problem with 5.15.61-v7+ (debian 11/RaspiOS)
Just tried this myself and the help for (-t) timeout states:
-t, --timeout=MSEC individual target initial timeout (default: 500 ms,
except with -l/-c/-C, where it's the -p period up to 2000 ms)
Since you are using -p 10, it is using that for the timeout as well as the interval between tests. In your case, this can be changed by specifying the timeout for each packet.
$ docker run fping -u -C5 -p10 -e www.weather.com
www.weather.com : - - - - -
$ docker run fping -u -C5 -p10 -t 500 -e www.weather.com
www.weather.com : 21.3 22.1 19.2 20.9 26.8
$ docker run fping -u -C5 -p10 -t 20 -e www.weather.com
www.weather.com : - - 18.7 - 18.5
I'm testing with the docker version available in #224
$ docker run fping -v
fping: Version 5.1