Tuesday 24 December 2013

Ping Test Batch File Windows

We got a report at work of a connection between two international sites being slow.

I needed to run some tests. I know how to run ping and tracert but running these alone in their default state doesn't yield all that much useful information.

I wanted to run more extensive tests and to save the results. I figured that someone out there had probably already created a batch file (.bat) to do this and I was right!

You can get a great one here:


This batch file runs PING and TRACERT



====== snip ======
@echo off
cls
echo.

echo Run PING to  %1  with small and large packets
echo Run TRACERT to  %1
echo Write output to c:\pingrpt.txt
echo Open c:\pingrpt.txt for editing
echo Optionally delete c:\pingrpt.txt

if "%1"=="" echo No remote host was specified... terminating.
if "%1"=="" goto end
echo.

echo Working . .
ping -f -n 10 -l 1464 %1 > c:\pingrpt.txt
echo Working . . .

echo ======================================================== >> c:\pingrpt.txt

ping -f -n 10 -l 12 %1 >> c:\pingrpt.txt
echo Working . . . .

echo ======================================================== >> c:\pingrpt.txt

tracert %1 >> c:\pingrpt.txt
echo Working . . . . .

edit c:\pingrpt.txt

echo.
del c:\pingrpt.txt /p

:end
====== snip ======

By the way, it turned out that the connection was not slow but the user was running a great deal of extraneous applications. As soon as he started his computer, updates started to download, DropBox started to synchronize etc.

1 comment:

  1. Just admiring your work and wondering how you managed this blog so well.
    see here

    ReplyDelete

Popular Posts