Solved

Ping time stamp

Posted on 2002-03-12
6
6,226 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
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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now