0

I'm working on an LAN issue which manifests as an occasional very high latency packet (~30 ms vs typical 3 ms round trip times). Using Windows

ping -t
I discovered that we're looking at one packet out of a hundred or more. I'd like to write a script that runs tracert until it gets a large latency (say 20+ ms) hop and then records the tracert output for additional diagnostics.

The problem is, this is not my desktop system and there aren't any of the handy dandy add on tools (awk, sed, perl, etc.) I'd normally use for manipulating the output file to get what I want.

Is there a way to collect this information with just Win7 command line commands?

Alternatively, is there a better command or approach for diagnosing this issue?

Jim2B
  • 167
  • 9
  • why don't you just log `ping -n 1` and `tracert` every x minutes and send the *large* log file for analysis where you have your dandy tools? – PA. Jul 01 '15 at 15:56
  • You could possibly string together a large PowerShell command, but since you apparently don't know much PowerShell it would probably be easier to write a PowerShell script. You would just need to parse the output of your ping command, convert the latency to an integer and if it's above the threshold run a function that runs a tracert command with output sent to to a log file. – Tony Hinkle Jul 01 '15 at 16:00
  • I used ping -n to discover that this occurs in about 2-3% of packets but it will occasionally go 200 or more pings without seeing the problem. I figured I could write a for / do loop to run tracert for 200-300 times and hope I catch a few but I wondered if there was something more elegant someone had developed :) – Jim2B Jul 01 '15 at 16:02
  • In regards to the porting things back and forth between my system with fancier tools. Yes, I just set up the mounts and plan to write some batch files and drop them in the host for additional diagnostics. I hate working on vanilla Windows because it feels like working with a blindfold and one arm tied behind my back. :( – Jim2B Jul 01 '15 at 16:06
  • Granted , it may be an overkill but you asked about alternatives: you could use netsh to record a trace and then diagnose it on your machine, see eg.: http://blogs.msdn.com/b/canberrapfe/archive/2012/03/31/capture-a-network-trace-without-installing-anything-works-for-shutdown-and-restart-too.aspx – wmz Jul 01 '15 at 16:49
  • You may also try `pathping` (https://technet.microsoft.com/en-us/library/cc958876.aspx) which combines `ping` and `tracert` – wmz Jul 01 '15 at 17:36
  • I probably will need some of the "overkill" methods. The LAN support team says that the occasional high latency packets are "working as intended". It may be up to me to do all the diagnostics for the LAN team. – Jim2B Jul 03 '15 at 03:07
  • Oh and go ahead and submit some of these as answers @wmz. I'll upvote them. Also I did write my own batch file to collect this for me. I'll post that as an answer later when I get some time. – Jim2B Jul 03 '15 at 03:09

0 Answers0