Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ping command

Status
Not open for further replies.

aastratech

Technical User
Aug 15, 2006
136
GB
can anyone tell me how to send a ping command to a file. I need to monitor for 8 hrs a connection to check for loss of network connection.?
Appreciate in advance any help on this
Thanks
 
You'll no doubt need to use the -t option. Ping the specified host until stopped!

ping -t "target" > c:\temp\test.txt

test.txt will be a pretty big file after 8 hours!!!!
 
cheers STDUC I assummed this anyway but thanks for the response
 
You could run a batch file and add time tagging so you know the time if a ping fails:
:LOOP
ping 192.168.0.1 -n 1 >> c:\temp\test.txt
time/T >> c:\temp\test.txt
ping 1.1.1.1 -n 1 -w 10000 > NUL
GOTO LOOP

The fourth line adds a 10 second delay so the file doesn't get too huge.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top