Ping with a Timestamp

· Windows Scripts

Here is a very quick and dirty way to monitor a server over an extended period of time. A timestamp will output on the screen so you can see when the server was available or not. It will also log to a file for archival purposes. Place the code below in a *.CMD file, replace “google.com” with the server or address of your choice, and double click.

@ECHO OFF
Time /t > Site_Log.txt
:BEGIN
Time /t >> Site_Log.txt
Ping google.com >> Site_Log.txt
Time /t
Ping google.com
GOTO BEGIN
author image

About Joseph Spurrier

I'm passionate about building solutions to automate tasks and improve efficiency. I worked for a few companies in the digital healthcare space. My education is in forensics. Tech guy. Traveler. Runner. Guitar player. Scotch and beer enthusiast. GitHub LinkedIn Twitter Google+

Share this post


Comments powered by Disqus