hallo, I can get the time of concrete ping to IP in Mikrotik script. Is it possible, tell me pls how? ![]()
Hi,
I am having a similar problem. I want to store the result into a variable, and then work with that variable.
Like this:
:local pingVal1 ([/ping 192.168.1.245 count=5])
:log info ($pingVal1)
But that only seems to store the count number, not the result.
You can do it like this:
:if ([/ping $IpToCheck count=10] = 0) do={
}
But I want to compare the result multiple times. Anyone know how to do that?
Hi, I have this code:
:global ping1
:global text1
:set ping1 [/ping 192.168.242.253 size=1024 count=90 interval=2]
:set text1 "Restart of the interface - "
:if ($ping1 < 70) do {
:log message=("Restart of the internface.Only " . $ping1 . " ping have passed") facility=System-Error
/interface disable Br
/interface enable Br
So, I want to disable and after enable interface, if the time of ping is bad, cause timeout of the ping is not usual.
Hi,
Thats what I have basically, but in 2.9.6 it only ever returns the “count” property. My ping times are usually 3-8ms
ie:
:local ping1
:set ping1 [/ping $IpToCheck size=64 count=1]
:log info ($ping1)
Returns 1
:local ping1
:set ping1 [/ping $IpToCheck size=64 count=5
:log info ($ping1)
Returns 5
:local ping1
:set ping1 [/ping $IpToCheck size=64 count=15]
:log info ($ping1)
Returns 15
Is this a bug?