Solved

Ping time stamp

Posted on 2002-03-12
6
6,258 Views
Last Modified: 2012-05-04
Hi

I am running the line Ping <Address> -t > Pingtest.txt from the command line of a WIN NT Server and I want to be able to add a Time stamp to each ping so I can look in the  log at a specified time and see what the ping was.

0
Comment
Question by:Richard_Eustace
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:defore
ID: 6856261
ping 4.2.2.2 -t -s 4 > ping.txt

Thanks
Steven
0
 
LVL 1

Author Comment

by:Richard_Eustace
ID: 6856275
I tried

ping greenmile -t -s 4 > ping.txt

and got

Pinging greenmile.Kainos.com [10.0.4.139] with 32 bytes of data:

Reply from 10.0.4.139: bytes=32 time<10ms TTL=128

    Timestamp: 10.0.4.139 : 3406857986

Reply from 10.0.4.139: bytes=32 time<10ms TTL=128

    Timestamp: 10.0.4.139 : 3038021378


The number does not look like a time, I would lihe a time stamp like 12/03/2002 12:30:33
0
 

Accepted Solution

by:
JimmyPop earned 50 total points
ID: 6862423
Are you trying to get the date stamp on each ping reply?  I know NT has command line utils called 'date' and 'time' that will spit out the current date/time.  With the /t parameter (on either commandline util) you are not prompted for into.  With some crafty batch file work you could periodically record the time/date using this.
0
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 
LVL 3

Expert Comment

by:CyberStretch
ID: 6865939
The timestamp you see, ie 3406857986, is in Universal Time; basically the way Unix determines time. To my knowledge, there is no switch available to the ping command that would convert it into "human readable" format.

Perhaps your best bet is to use:
date [enter] (displays current date)
time [enter] (displays current time)
ping greenmile -t (if you want a continuous ping)
time [enter] (displays current time)

Ping is basically used for measuring host response in milliseconds (1/1000 of a second). It would be impossible to timestamp anything that takes less that 1000ms since that would equate to less that 1 second; which is the maximum accuracy supported by system clocks. You would need something more accurate that would produce something like the following: 03/14/02 03:14:52.189, displaying the fractions of a second.
0
 
LVL 3

Expert Comment

by:CyberStretch
ID: 6866007
You may be interested in a utility such as Ping Plotter (http://www.pingplotter.com) to get the details you require.
0
 

Expert Comment

by:Gangavaram
ID: 21472912
I Would need  perl script for Ping with Date and time stamp
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question