1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

timestamping a ping request

Discussion in 'All Other Software' started by Techmonkeys, Mar 29, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. Techmonkeys

    Techmonkeys Thread Starter

    Joined:
    Feb 10, 2005
    Messages:
    625
    As you know you know you can run a constant ping against an address using the -t switch.

    You can also send the results of the ping to a text file using the "> c:\blah.txt" at the end of the ping command.

    My question is, is it possible to timestamp the ping reply in the text file? so that you could run a constant ping and see the times it stopped replying?

    so the output would look like:

    or something similar? or is there a 3rd party app that may do it?

    p.s. should this be in the networking section of the site?
     
  2. lotuseclat79

    lotuseclat79

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Hi The_KiD,

    Since the default ping command issues 4 ping requests at a time, in order to attach a date-timestamp to each request's reply would require the ping command be modified, however, it contains no interface to do so.

    The only way to accomplish this would be to write a script and combine one date-timestamp for all 4 replies, or reduce the count of the ping command by using the parameters: ping -n 1 <host ip address>.

    The script would have to use a different command than the time /t command to get the second resolution, since the default format for using /t is in format hh:mm rather than in hh:mm:ss. However, combined with the -n 1 count it might be done.

    Perhaps an inline answer to the time command could be induced in the script to simulate the ENTER response to not reset the time, but get the hh:mm:ss response to use in the output you desire.

    -- Tom
     
  3. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,731
  4. Techmonkeys

    Techmonkeys Thread Starter

    Joined:
    Feb 10, 2005
    Messages:
    625
    Squashman, if it were possible to ftp a hug to someone I would :)

    Thanks mate thats exactly what I needed.

    Thanks also to lotuseclat, however my programming skills died with turbo pascal :)
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/454030