[MacPorts] #22077: mrtg-ping-probe doesn't calculate packet loss correctly on Darwin

MacPorts noreply at macports.org
Wed Oct 14 20:22:48 PDT 2009


#22077: mrtg-ping-probe doesn't calculate packet loss correctly on Darwin
------------------------------------+---------------------------------------
 Reporter:  msantos@…               |       Owner:  macports-tickets@…                   
     Type:  defect                  |      Status:  new                                  
 Priority:  Normal                  |   Milestone:                                       
Component:  ports                   |     Version:  1.8.1                                
 Keywords:                          |        Port:  mrtg-ping-probe                      
------------------------------------+---------------------------------------
 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

-- 
Ticket URL: <http://trac.macports.org/ticket/22077>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list