Tue Jun 01, 2010 9:25 pm
How come your dropping so much ICMP?
There was a ping probe that did 10 pings and calculated packet loss, check out the probe thread.
Here it is... thanks to Pablete
1st I have created a function:
Name: packet_loss_test
Desc: number of replied pings from 10 ping requests (0-10)
Code:
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 ) +
if( array_element(ping(device_property("FirstAddress")) , 0)<0 , 0 , 1 )
2nd) I have created the probe
Name: reachability
Type: function
Available: ping(device_property("FirstAddress")) >= 0
Error: ""
Value: packet_loss_test()*10
Unit: %
If you want finer values you can make an addition of 20 pings instead of 10 and change Value in the probe for
packet_loss_test()*5
but the probe will be more intrusive.
Sounds like it doesn't work as planned
I have noticed that the Dude only performed two pings of the ten i wrote in the function. Options are:
1) to change the function to make only two pings and to change the probe Value: packet_loss_test()*50
2) to execute an external ping. I'm working on this.
3) to enhace the ping function, with a parameter that should be the number of packets to send, and to return the number of answered packets.
Maybe you can add to it and fix it?