Other variables pinging

Hi I need help to develop scripts.

I want to take some values pinging.

for example I have this line in a script

Global pingresultA [/ ping 208.67.220.220 interface = ether6_WAN1 count = 5] \

And take a value if you are receiving ping or not. Now what I want for the new script is to take the values of MS “avg-rtt”

Pinging in mikrotik throws for example these results

SEQ SIZE TTL TIME HOST STATUS
0 56 56 8.8.8.8 62ms
1 56 56 8.8.8.8 300ms
2 56 56 8.8.8.8 237ms
3 56 56 8.8.8.8 63ms
4 56 56 8.8.8.8 62ms
sent = 5 = 5 received packet-loss = 0% min-rtt = 62ms RTT = 144ms avg-max-rtt = 300ms

As I get the script takes the value of avg-rtt.

Thank you very much

Using the ping command like that in the terminal only returns the number of successful pings.
For example this:

[admin@MikroTik] > :global test [:ping 8.8.8.8 count=5]
  SEQ HOST                                     SIZE TTL TIME  STATUS                                             
    0 8.8.8.8                                    56  47 16ms 
    1 8.8.8.8                                    56  47 15ms 
    2 8.8.8.8                                    56  47 15ms 
    3 8.8.8.8                                    56  47 15ms 
    4 8.8.8.8                                    56  47 15ms 
    sent=5 received=5 packet-loss=0% min-rtt=15ms avg-rtt=15ms max-rtt=16ms 

[admin@MikroTik] > :put $test
5
[admin@MikroTik] >

If what you want is a speed test, I suggest you look into the bandwidth test feature.
See: http://wiki.mikrotik.com/wiki/Manual:Tools/Bandwidth_Test

Thank you for answering, but what I want is to get the average response time (avg-rtt)

I don’t know if there is a way to get that.
But I know that it at least isn’t possible with the “:ping” command, as I demosatred above.

As stated previously it is not possible. You can get only count of successful replies.