Is there a way to output traceroute to a file instead of the terminal? I want netwatch run traceroute everytime delay is longer than xxx ms...
TIA
WHOLEY FANTASTIC-NESS!!!!
it works on 6.33
but not on 6.29
I suspect some weird version bug... but that gets me in the right direction.
curious if it will append...for me but , I'm not complaining.!
Thank you
works fine in 6.38not working in 6.33 : create an empty file
The command below does not work from netwatch in version 6.42.9. Is that due to the security changes where netwatch has limited permission? Is there anyway to run a traceroute from netwatch in up to date versions?works fine in 6.38not working in 6.33 : create an empty file
Create a Script called "SCRIPT-PING-TRACE" or call it what you want and make it match above
put this in the script. (the trace and ping logs will get overwritten each time this occurs , so you will need to get to them quick)
:log info "\rNW-8.8.8.8 down\r";
:execute {/ping 8.8.8.8 count=100} file=ping-fail;
:execute {/tool traceroute 8.8.8.8 duration=5} file=TRACEROUTE
Because the time have : and the computer do not support that filename.@PaulsMT
can u pls modificate that script , it does create file, but i can't paste into the computer
:global simplercurrdatetimestr do={
/system clock
:local vdate [get date]
:local vtime [get time]
:local vdoff [:toarray "0,4,5,7,8,10"]
:local MM [:pick $vdate ($vdoff->2) ($vdoff->3)]
:local M [:tonum $MM]
:if ($vdate ~ ".../../....") do={
:set vdoff [:toarray "7,11,1,3,4,6"]
:set M ([:find "xxanebarprayunulugepctovecANEBARPRAYUNULUGEPCTOVEC" [:pick $vdate ($vdoff->2) ($vdoff->3)] -1] / 2)
:if ($M>12) do={:set M ($M - 12)}
:set MM [:pick (100 + $M) 1 3]
}
:local yyyy [:pick $vdate ($vdoff->0) ($vdoff->1)]
:local dd [:pick $vdate ($vdoff->4) ($vdoff->5)]
:local HH [:pick $vtime 0 2]
:local mm [:pick $vtime 3 5]
:local ss [:pick $vtime 6 8]
:return "$yyyy-$MM-$dd $HH:$mm:$ss"
}
:execute "/tool traceroute 8.8.8.8 duration=5" file="$[$simplercurrdatetimestr]_traceroute"
# rememer to wait 1s + traceroute duration before doing other steps
:delay 6s