computing
  • 0

Need a Batch File To Run Tracert Once Per h

  • 0

Hey guys,
Im having isp problems with lost packets, and I need a batch file to exec tracert once per hour or so all day and create a log of its findings. Can someone help me?
thanks
nub

Share

1 Answer

  1. To use the sleep command in the above code u need

    “Windows Server 2003 Resource Kit Tools”
    download it from

    http://technet.microsoft.com/en-us/…

    then
    Save the above code with some name.cmd or name.bat
    the above code generates three logs every hour..
    in the folder D:\Monitoring\20110210
    you will get the output in this format in a logfile “Log20110210.txt”

    ———————————————————-
    SERVER TIMESTAMP STATUS
    ———————————————————
    172.16.71.46 19:11:34 Success

    You will also get log file of ping and tracert as follows
    Ping_20110210_19’11’34’96.txt

    Pinging 172.16.71.46 with 32 bytes of data:
    Reply from 172.16.71.46: bytes=32 time<1ms TTL=127
    Reply from 172.16.71.46: bytes=32 time<1ms TTL=127
    Reply from 172.16.71.46: bytes=32 time<1ms TTL=127
    Reply from 172.16.71.46: bytes=32 time=1ms TTL=127
    Ping statistics for 172.16.71.46:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 1ms, Average = 0ms

    Tracert_20110210_19’11’34’96.txt

    Tracing route to 172.16.71.46 over a maximum of 30 hops
    1 <1 ms <1 ms 1 ms 172.16.69.2
    2 <1 ms <1 ms <1 ms 172.16.71.46
    Trace complete.

    • 0