Ping computers with Time Stamp

Here it is: A small script that pings computer with Time Stamp:

@Echo off
echo %time% > c:\PingServer.txt
Ping 111.34.22.45 >> C:\PingServer.txt

Note the ">>" in above redirector. This redirector enables you to append the file rather than overwrite it.

Will sought more on this if time permits :)

Cool
 

Comments

# re: Ping computers with Time Stamp

Thursday, August 16, 2007 9:12 AM by Rory Schmitz

Hi Nirmal,

I like this script idea.  How would I turn it up a notch though?  I'm looking to add a time stamp on every single reply I get back from the device I am pinging.  How would I do that?  For example:

Pinging 172.25.0.60 with 32 bytes of data:

8:54:52 Reply from 172.25.0.60: bytes=32 time=3ms TTL=64

8:54:53 Reply from 172.25.0.60: bytes=32 time=2ms TTL=64

8:54:54 Reply from 172.25.0.60: bytes=32 time=3ms TTL=64

8:54:55 Reply from 172.25.0.60: bytes=32 time=2ms

Ping statistics for 172.25.0.60:

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

Approximate round trip times in milli-seconds:

   Minimum = 2ms, Maximum = 4ms, Average = 2ms

Is this possible?

# re: Ping computers with Time Stamp

Thursday, August 16, 2007 11:23 PM by Nirmal Sharma

Time with each reply = Total Time of Replies -  time=3ms

# re: Ping computers with Time Stamp

Wednesday, August 22, 2007 4:25 PM by michael simmons

you can also loop it:

:TOP

echo %time% >> c:\PingServer.txt

Ping 111.34.22.45 >> C:\PingServer.txt

GOTO TOP

# re: Ping computers with Time Stamp

Thursday, September 13, 2007 2:41 PM by Melvin

Thank you.  This will assist me with something on which I'm working and will get me a few more hours sleep.  I'll possibly be able to go to church on sunday instead of monitoring a server.

# dvd decoders for windows

Tuesday, July 22, 2008 5:16 AM by dvd decoders for windows

As a heavy metal/ hard rock afficionado I was more than a little suspicious of the talent or the bonafides of Lordi, the Finnish heavy metal band that won this year\'s Eurovision song contest. I mean any song contest with the word Euro in it is going

# dvd decrypter

Tuesday, July 22, 2008 6:22 AM by dvd decrypter

scan IP address , scan your TCP/ UDP ports , scan several specifically popular TCP/ UDP ports.

# decrypt dvd movie

Tuesday, July 22, 2008 7:17 AM by decrypt dvd movie

Many processes run under the name“ SVCHOST. EXE” and when it has problems, it’ s difficult to track down the cause. Examples of problems include system hangs or 100% CPU utilization that is attributed to the service. The performance team of Microsoft

# shrink dvd size

Friday, August 01, 2008 9:01 AM by shrink dvd size

In my post Controlling computers, I wrote about Jeff Han, whose team has created a mindboggling new prototype for a computer interface. Now, at TED, you can see Jeff show the interface and explain a bit how it works. This is what our kids will be usin

# re: Ping computers with Time Stamp

Thursday, October 09, 2008 6:59 AM by mostafa kamel

Hi roy,

Do you success in doing the time-stamp please update me if you could

# re: Ping computers with Time Stamp

Thursday, October 09, 2008 7:27 AM by Nirmal Sharma

Let me tell you one thing. Ping command doesn't support any API function. Meaning it won't allow you to add your own command in each reply. You have to use mechanism provided by other users.

You can not insert your own command in each reply.

Nirmal.

# re: Ping computers with Time Stamp

Wednesday, October 22, 2008 1:12 PM by Dlogan

I found this tool that does a ping with a timestamp. It works great!

www.cfos.de/.../ping.htm

Enjoy!

# Nrxqmgqv

Tuesday, July 14, 2009 2:39 PM by Nrxqmgqv

QqxyZO

# re: Ping computers with Time Stamp

Saturday, September 19, 2009 4:43 AM by Henno

I also found that tool. And this is the command line I use to catch request-timed-out errors with timestamp:

hrping -t -o -F c:\pingcheck.txt -qr -T -s 0 -w 997 example.com

-t constant ping

-o don't do overlapped pinging (to be able to catch timestamps of request timed outs)

-F log also to file

-qr suppress normal replies (to not overflood log files/console)

-T print timestamp

-s time between two ping attempts (0ms)

-w time to wait for reply (997ms)

HTH

# re: Ping computers with Time Stamp

Saturday, October 10, 2009 7:26 PM by Jaik

Found a real simple cycle that did the job for me.

@ECHO OFF

:TOP

FOR /F "tokens=3,4,5 delims= " %%A IN ('PING -a %1 -n 1 ^| FIND "Reply"') DO ECHO %DATE% %TIME% %%A %%B %%C >> pingpong.txt

GOTO TOP

hope this helps

Leave a Comment

(required) 
(required) 
(optional)
(required)