Jump to content
Sign in to follow this  
php

Batch file for ping and tracert

Recommended Posts

I spent the last couple hours designing this batch program for Windows shell script.  I combined ping and tracert into a single program with the option to create a log.  Its easy to use :)    Email, IM, or PM me with any problems/questions.

*edit*

.S1 has graciously offered to host this for me:

http://s1.camaroz.net/testmy/check.bat

Share this post


Link to post
Share on other sites

lol thats a pretty slick program man.  Props :)

=============

    BEGIN

=============

Pinging s1.camaroz.net [205.209.168.30] with 32 bytes of data:

Reply from 205.209.168.30: bytes=32 time=81ms TTL=51

Reply from 205.209.168.30: bytes=32 time=80ms TTL=51

Reply from 205.209.168.30: bytes=32 time=80ms TTL=51

Reply from 205.209.168.30: bytes=32 time=84ms TTL=51

Ping statistics for 205.209.168.30:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 80ms, Maximum = 84ms, Average = 81ms

Ping Complete

Press any key to continue . . .

Tracing route to s1.camaroz.net [205.209.168.30]

over a maximum of 30 hops:

  1    5 ms    6 ms    5 ms  10.102.192.1

  2    8 ms    7 ms    8 ms  atm5-0-644.tampflerl-rtr1.tampabay.rr.com [24.92.7.42]

  3    8 ms    7 ms    8 ms  65.32.8.133

  4    8 ms    7 ms    7 ms  pop1-tby-P0-1.atdn.net [66.185.136.169]

  5    8 ms    7 ms    8 ms  bb1-tby-P0-0.atdn.net [66.185.136.160]

  6    26 ms    25 ms    26 ms  bb2-atm-P7-0.atdn.net [66.185.152.245]

  7    25 ms    25 ms    24 ms  pop1-atm-P4-1.atdn.net [66.185.150.3]

  8    38 ms    38 ms    37 ms  so-5-2-0.mpr1.atl6.us.above.net [209.249.119.241]

  9    57 ms    59 ms    57 ms  so-4-0-0.mpr2.iah1.us.above.net [64.125.29.70]

10    56 ms    *      56 ms  so-0-0-0.mpr1.iah1.us.above.net [64.125.31.61]

11    58 ms    79 ms    56 ms  so-5-2-0.cr1.dfw2.us.above.net [64.125.30.230]

12    81 ms    82 ms    80 ms  so-4-1-0.mpr4.sjc2.us.above.net [64.125.29.57]

13    81 ms    81 ms    80 ms  so-0-0-0.er10a.sjc2.us.above.net [64.125.30.94]

14    82 ms    81 ms    81 ms  reserved.above.net [209.133.64.124]

15    82 ms    79 ms    80 ms  66-154-102-52.assertivenetworks.net [66.154.102.52]

16    82 ms    80 ms    81 ms  66.79.175.2

17    80 ms    80 ms    82 ms  205.209.168.30

Trace complete.

Press any key to continue . . .

Share this post


Link to post
Share on other sites

You can zip it and upload :lol:

-REH

I actually didnt even think of that  :shock: too late at night  lol

.s1, if you want, i can do that so you dont have to host it :)

Share this post


Link to post
Share on other sites

lol its a 2 kb file.. i think i can spare it

:haha:

still tho, very neat lil prog there. saves the need to open 2 cmmd prmpts, and wait for 1 to complete, double copy and paste. :)

edit

Some people may not realize this , but you have to

* + - Right click and Save as - + *

:lol:

Share this post


Link to post
Share on other sites

i wanted to design one to delete the index.dat files as discussed in the topic https://testmy.net/topic-347, but that would be more tough.

i dont know if you tried the logging or not, but that saves the results to a text file that you can open at the end of the test :)  the only problem is it doesnt display the results while the test is running :(

Share this post


Link to post
Share on other sites

That's pretty nice, good thinking  :)

Tracing route to testmy.net [67.19.36.6]

over a maximum of 30 hops:

  1    10 ms    11 ms    15 ms  69.166.151.1

  2    14 ms    16 ms    10 ms  69.165.28.73

  3    12 ms    11 ms    12 ms  69.165.28.69

  4    17 ms    19 ms    15 ms  69.165.28.65

  5    18 ms    19 ms    20 ms  g1-03-01-00.a0.cle00 [66.109.14.125]

  6    29 ms    15 ms    26 ms  p3-00-01-00.c0.pit75.adelphiacom.net [66.109.1.105]

  7    27 ms    35 ms    31 ms  p3-01-01-00.c1.chi75.adelphiacom.net [66.109.0.209]

  8    54 ms    56 ms    54 ms  p3-01-01-00.c1.dfw91.adelphiacom.net [66.109.0.66]

  9    64 ms    57 ms    59 ms  g1-03-02-00.p0.dfw91.adelphiacom.net [66.109.3.78]

10    59 ms    64 ms    58 ms  eq-dallas-1000M.theplanet.com [206.223.118.3]

11    53 ms    56 ms    58 ms  dist-vlan31.dsr3-1.dllstx3.theplanet.com [70.85.127.29]

12    60 ms    59 ms    66 ms  dist-vlan-42.dsr2-2.dllstx4.theplanet.com [70.85.127.91]

13    58 ms  109 ms    56 ms  gig1-0-1.tp-car9-1.dllstx4.theplanet.com [67.18.116.69]

14    57 ms    55 ms    67 ms  6.67-19-36.reverse.theplanet.com [67.19.36.6]

Trace complete.

-REH

Share this post


Link to post
Share on other sites

good job php :)

Its easy to use, but could you write one version that automatic check ping and tracert testmy.net and automatic copy the log, so ppl using the program just have to click paste when they ask for help here?

Im sure most ppl can handle this as it is, but it would help some

VanBuren :)

Share this post


Link to post
Share on other sites

Log created by Check.bat on Sun 03/13/2005

Pinging testmy.net [67.19.36.6] with 32 bytes of data:

Reply from 67.19.36.6: bytes=32 time=147ms TTL=49

Reply from 67.19.36.6: bytes=32 time=133ms TTL=49

Reply from 67.19.36.6: bytes=32 time=136ms TTL=49

Reply from 67.19.36.6: bytes=32 time=129ms TTL=49

Ping statistics for 67.19.36.6:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 129ms, Maximum = 147ms, Average = 136ms

Ping Complete.

Tracing route to testmy.net [67.19.36.6]

over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.0.1

  2    14 ms    39 ms    21 ms  10.115.0.1

  3    18 ms    43 ms    16 ms  pool-t2cam1-b-ge92.inet.ntl.com [80.5.168.129]

  4    26 ms    34 ms    18 ms  sot3-t2core-b-pos71.inet.ntl.com [80.4.225.137]

  5    23 ms    14 ms    14 ms  gfd-bb-b-so-330-0.inet.ntl.com [62.253.185.53]

  6    40 ms    14 ms    43 ms  bre-bb-a-so-000-0.inet.ntl.com [213.105.172.149]

  7    48 ms    14 ms    59 ms  sl-gw23-lon-11-0.sprintlink.net [213.206.159.37]

  8    75 ms    14 ms    40 ms  sl-bb22-lon-8-0.sprintlink.net [213.206.128.60]

  9    97 ms    89 ms  100 ms  sl-bb20-nyc-2-0.sprintlink.net [144.232.9.163]

10  123 ms    84 ms  102 ms  sl-bb26-nyc-6-0.sprintlink.net [144.232.13.9]

11  119 ms    91 ms    94 ms  sl-bb23-pen-12-0.sprintlink.net [144.232.20.95]

12    95 ms  121 ms    86 ms  sl-bb20-pen-14-0.sprintlink.net [144.232.16.25]

13  199 ms  143 ms  137 ms  sl-bb27-fw-13-0.sprintlink.net [144.232.8.65]

14  144 ms  140 ms  133 ms  sl-st20-dal-1-0.sprintlink.net [144.232.9.136]

15  137 ms  127 ms  136 ms  144.223.244.142

16  129 ms  139 ms  142 ms  dist-vlan31.dsr3-2.dllstx3.theplanet.com [70.85.127.30]

17  170 ms  129 ms  168 ms  dist-vlan-42.dsr2-2.dllstx4.theplanet.com [70.85.127.91]

18  133 ms  127 ms  128 ms  gig1-0-2.tp-car9-1.dllstx4.theplanet.com [67.18.116.85]

19  187 ms  180 ms  141 ms  6.67-19-36.reverse.theplanet.com [67.19.36.6]

Trace complete.

Share this post


Link to post
Share on other sites

Attached to this post is an archive.

Contents:

  Autocheck.bat - automatically pings and tracerts TestMy.net, and copies the results to the clipboard

  Check.bat - updated version of the previous check.bat file.  Added capability to copy results to clipboard

  cb.exe - The program that copies the results to the clipboard

  readme.txt - Readme file with a brief description of each file

Once again, if you encounter any problems, or have any comments/suggestions, post here, IM me through ICQ, AIM, Yahoo, or MSN, PM me, or email me. (I am pretty easy to contact :haha: )

Thanks to VanBuren for the suggestion.  Your idea worked well. :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...