Link to home
Start Free TrialLog in
Avatar of Lesd0
Lesd0

asked on

CAPTURE PING OUTPUT

I want to run a constant ping on a router for 72 hours and capture the output with time and date in a txt file
Avatar of Mike Thomas
Mike Thomas
Flag of United Kingdom of Great Britain and Northern Ireland image

Something like this would do it.

ping -t > c:\pingoutput.txt

Possibly

ping -t >> c:\pingoutput.txt
(to append)

give it a go now, you will manually have to stop the ping mind.

Avatar of Lesd0
Lesd0

ASKER

Thanks thats worked
Is there any way of putting a time stamp on it?
An incrimental time stamp throughout the log you mean? not possible with the command line tool afaik

There may be a third party tool that can do that though, i will have a look and see what i can find
Avatar of Lesd0

ASKER

An incrimental time stamp throughout so I can go away and forget about it until monday is what I am after.  Thanks
ASKER CERTIFIED SOLUTION
Avatar of Mike Thomas
Mike Thomas
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
del ping.txt
:start
echo %date%%time >>ping.txt
ping -n 1 servername |find /i "packets" >>ping.txt

goto start

replace servername with you server name
if you're looking for errors look for 100% loss in the ping.txt file
Avatar of Lesd0

ASKER

Perfect for what I need