Opened 15 years ago
Closed 10 years ago
#22077 closed defect (fixed)
mrtg-ping-probe @2.2.0 doesn't calculate packet loss correctly on Darwin
Reported by: | msantos@… | Owned by: | jberry@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.1 |
Keywords: | Cc: | ||
Port: | mrtg-ping-probe |
Description
mrtg-ping-probe doesn't calculate the packet loss correctly. Looking at the code (I'm not a Perl expert) it looks like the regular expression is not accounting for Darwin's ping program, which reports packet loss as a floating point number (e.g., 100.0% for full packet loss). Here is an example, where the IP address 10.0.42.2 is unreachable on my network:
$ mrtg-ping-probe -k 1 -p loss/loss 10.0.42.2 mrtg-ping-probe: ERROR: Could not find ping summary for 10.0.42.2 mrtg-ping-probe: INFO: The output of the ping command /sbin/ping -s 56 -c 1 10.0.42.2 was: PING 10.0.42.2 (10.0.42.2): 56 data bytes
--- 10.0.42.2 ping statistics --- 1 packets transmitted, 0 packets received, 100.0% packet loss
0 0
Attachments (1)
Change History (5)
comment:1 Changed 15 years ago by msantos@…
Cc: | msantos@… added |
---|
Changed 15 years ago by msantos@…
Attachment: | mrtg-ping-probe added |
---|
modified version with a fix to the RE that seems to work (for me)
comment:2 Changed 15 years ago by msantos@…
With the modified version, output looks like:
$ mrtg-ping-probe -p loss/loss 10.0.42.2 mrtg-ping-probe: ERROR: Could not find ping summary for 10.0.42.2 mrtg-ping-probe: INFO: The output of the ping command /sbin/ping -s 56 -c 10 10.0.42.2 was: ping: sendto: No route to host ping: sendto: Host is down ping: sendto: Host is down ping: sendto: Host is down ping: sendto: Host is down ping: sendto: Host is down PING 10.0.42.2 (10.0.42.2): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3 Request timeout for icmp_seq 4 Request timeout for icmp_seq 5 Request timeout for icmp_seq 6 Request timeout for icmp_seq 7 Request timeout for icmp_seq 8 --- 10.0.42.2 ping statistics --- 10 packets transmitted, 0 packets received, 100.0% packet loss 100 100
comment:3 Changed 15 years ago by mf2k (Frank Schima)
Cc: | msantos@… removed |
---|---|
Owner: | changed from macports-tickets@… to jberry@… |
comment:4 Changed 10 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Summary: | mrtg-ping-probe doesn't calculate packet loss correctly on Darwin → mrtg-ping-probe @2.2.0 doesn't calculate packet loss correctly on Darwin |
Cc Me!