Community discussions

MikroTik App
 
yogii
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Wed Jun 16, 2010 5:38 am
Location: Batam, Indonesia

[ASK] how to log ping time result

Wed Jun 15, 2011 4:49 pm

hello..

help me please, i want log ping time result, i use script :put :log and not works, anybody knows another way?
 
yogii
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Wed Jun 16, 2010 5:38 am
Location: Batam, Indonesia

Re: [ASK] how to log ping time result

Thu Jun 16, 2011 5:48 am

i still can't solved... :(
 
User avatar
9939781
Member Candidate
Member Candidate
Posts: 103
Joined: Tue Jun 14, 2011 6:42 am

Re: [ASK] how to log ping time result

Thu Jun 16, 2011 6:35 am

i still can't solved... :(
me too.i think this is vrey hard!
 
yogii
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Wed Jun 16, 2010 5:38 am
Location: Batam, Indonesia

Re: [ASK] how to log ping time result

Thu Jun 16, 2011 9:38 am

in linux its very easy, but how in ROS?

help me master,brother,sister....
 
User avatar
petrn
Member Candidate
Member Candidate
Posts: 180
Joined: Thu Jul 29, 2010 3:56 am
Location: Dubai

Re: [ASK] how to log ping time result

Sun Jun 19, 2011 1:05 am

Hi,

solution is here: http://wiki.mikrotik.com/wiki/MikroTik_ ... e_Requests
Edit and pray that more people will request this feat.
 
yogii
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Wed Jun 16, 2010 5:38 am
Location: Batam, Indonesia

Re: [ASK] how to log ping time result

Sun Jun 19, 2011 4:30 am

:) thank you petrn, its all nice idea, i think ROS will become greater than another router os.

i love MT ROS. :)
 
bburley
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Thu Nov 18, 2010 7:22 am
Location: Alberta, Canada

Re: [ASK] how to log ping time result

Sat Jun 25, 2011 7:54 pm

Does this work for you?
:local avgRtt;
:local pin
:local pout
/tool flood-ping 192.168.1.1 count=10 do={
  :if ($sent = 10) do={
    :set avgRtt $"avg-rtt"
    :set pout $sent
    :set pin $received
  }
}
:local ploss (100 - (($pin * 100) / $pout))
:local logmsg ("Ping Average for 192.168.1.1 - ".[:tostr $avgRtt]."ms - packet loss: ".[:tostr $ploss]."%")
:log info $logmsg
The IP address is just an example, a variable could be used to set the address.
 
yogii
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Wed Jun 16, 2010 5:38 am
Location: Batam, Indonesia

Re: [ASK] how to log ping time result

Sun Jun 26, 2011 5:21 am

hello bburley,

i've tried flood ping tool, but i think flood ping and ping utility are different thing and the result of test of them also different, may be i don't understand how to use it. :(
 
bburley
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Thu Nov 18, 2010 7:22 am
Location: Alberta, Canada

Re: [ASK] how to log ping time result

Sun Jun 26, 2011 10:16 am

When you used flood-ping did you limit the number of pings with the "count=" parameter?
 
yogii
Member Candidate
Member Candidate
Topic Author
Posts: 148
Joined: Wed Jun 16, 2010 5:38 am
Location: Batam, Indonesia

Re: [ASK] how to log ping time result

Sun Jun 26, 2011 2:39 pm

yes i did, and it run with schedule every 1 second.

is there any way how to log ping result?
 
bburley
Frequent Visitor
Frequent Visitor
Posts: 80
Joined: Thu Nov 18, 2010 7:22 am
Location: Alberta, Canada

Re: [ASK] how to log ping time result

Mon Jun 27, 2011 12:56 am

The script that I posted logs the average response time for 10 pings as well as the packet loss if any. You can modify the number of pings or exactly what is logged by modifying the script. Then run the script with the scheduler.

Who is online

Users browsing this forum: No registered users and 25 guests