Can someone explain to me how to set up a constant ping to an IP address and capture the output to a log file. I am having some power issues at one of my remote sites, and I want to caputer when & how often it goes down.
If it's a Windows machine, you can run a fairly rudimentary batch file to do this. Create a file, e.g. pingtest.bat, and insert the following lines in it:
Basically this will capture the date and time, run 4 pings and repeat. It will save all the output to a new file called log.txt
If you want to run more pings than the default of 4, simply add a -n flag (e.g. ping -n 10 a.b.c.d will run 10 pings) to the ping command above. If you run a continuous ping (-t), the batch file will never loop and thus you will never be sure what time it went down.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.