schweikert / fping

High performance ping tool
https://fping.org
Other
1.01k stars 249 forks source link

Incorrect latency results when run with `-N` argument #256

Closed gmta closed 2 years ago

gmta commented 2 years ago

Fping provides the wrong latency values when it is running with the -N argument.

Example (wrong) output with fping version 5.0:

# fping -N -l -Q 2 -p 2000 -R -b 56 -i 1 -r 0 -t 5000 domain.tld
CHART fping.domain.tld_packets '' 'FPing Packets for host domain.tld' packets 'domain.tld' fping.packets line 110020 2
DIMENSION xmt sent absolute 1 1
DIMENSION rcv received absolute 1 1
BEGIN fping.domain.tld_packets
SET xmt = 1
SET rcv = 1
END
CHART fping.domain.tld_quality '' 'FPing Quality for host domain.tld' percentage 'domain.tld' fping.quality area 110010 2
DIMENSION returned '' absolute 1 1
BEGIN fping.domain.tld_quality
SET returned = 100
END
CHART fping.domain.tld_latency '' 'FPing Latency for host domain.tld' ms 'domain.tld' fping.latency area 110000 2
DIMENSION min minimum absolute 1 1000000
DIMENSION max maximum absolute 1 1000000
DIMENSION avg average absolute 1 1000000
BEGIN fping.domain.tld_latency
SET min = 0
SET avg = 1412325340
SET max = 1412325355
END
BEGIN fping.domain.tld_packets
SET xmt = 1
SET rcv = 1
END
BEGIN fping.domain.tld_quality
SET returned = 100
END

Correct output with fping version 4.2:

# fping -N -l -Q 2 -p 2000 -R -b 56 -i 1 -r 0 -t 5000 domain.tld
CHART fping.domain.tld_packets '' 'FPing Packets for host domain.tld' packets 'domain.tld' fping.packets line 110020 2
DIMENSION xmt sent absolute 1 1
DIMENSION rcv received absolute 1 1
BEGIN fping.domain.tld_packets
SET xmt = 1
SET rcv = 1
END
CHART fping.domain.tld_quality '' 'FPing Quality for host domain.tld' percentage 'domain.tld' fping.quality area 110010 2
DIMENSION returned '' absolute 1 1
BEGIN fping.domain.tld_quality
SET returned = 100
END
CHART fping.domain.tld_latency '' 'FPing Latency for host domain.tld' ms 'domain.tld' fping.latency area 110000 2
DIMENSION min minimum absolute 10 1000
DIMENSION max maximum absolute 10 1000
DIMENSION avg average absolute 10 1000
BEGIN fping.domain.tld_latency
SET min = 1054
SET avg = 1054
SET max = 1054
END
BEGIN fping.domain.tld_packets
SET xmt = 1
SET rcv = 1
END
BEGIN fping.domain.tld_quality
SET returned = 100
END

To be clear, the incorrect output is:

DIMENSION min minimum absolute 1 1000000
DIMENSION max maximum absolute 1 1000000
DIMENSION avg average absolute 1 1000000
BEGIN fping.domain.tld_latency
SET min = 0
SET avg = 1412325340
SET max = 1412325355
END

The actual latency is ~10ms.

This issue blocks https://github.com/netdata/netdata/issues/12937.

ilyam8 commented 2 years ago

Example (wrong) output with fping version 5.0

Might be a duplicate of #219, if so:

gmta commented 2 years ago

@ilyam8 I am unable to update to Fping version 5.1, because I'm running a Netdata Docker container which uses Alpine as a base. Fping 5.1 is not available as an Alpine package AFAICT.

ilyam8 commented 2 years ago

I understand, just saying that the bug is known and fixed in v5.1. I think the issue in this repo can be closed.

gmta commented 2 years ago

Can confirm that pulling Fping v5.1 from the Alpine Edge repositories resolves the issue - closing this. Thanks!