Ping with timestamp on Windows CLI
Asked Answered
C

19

124

On the Windows command prompt cmd, I use ping -t to 10.21.11.81

Reply from 10.21.11.81: bytes=32 time=3889ms TTL=238
Reply from 10.21.11.81: bytes=32 time=3738ms TTL=238
Reply from 10.21.11.81: bytes=32 time=3379ms TTL=238

Are there any possibilities to get an output like this?

10:13:29.421875 Reply from 10.21.11.81: bytes=32 time=3889ms TTL=238
10:13:29.468750 Reply from 10.21.11.81: bytes=32 time=3738ms TTL=238
10:13:29.468751 Reply from 10.21.11.81: bytes=32 time=3379ms TTL=238

Please note that I wanna achieve this with only commands provided by CMD

Celindaceline answered 23/7, 2014 at 9:4 Comment(2)
possible duplicate of How to timestamp every ping result?Cranberry
A more generic version: #22064Algae
S
112
@echo off
    ping -t localhost|find /v ""|cmd /q /v:on /c "for /l %%a in (0) do (set "data="&set /p "data="&if defined data echo(!time! !data!)" 

note: code to be used inside a batch file. To use from command line replace %%a with %a

Start the ping, force a correct line buffered output (find /v), and start a cmd process with delayed expansion enabled that will do an infinite loop reading the piped data that will be echoed to console prefixed with the current time.

2015-01-08 edited: In faster/newer machines/os versions there is a synchronization problem in previous code, making the set /p read a line while the ping command is still writting it and the result are line cuts.

@echo off
    ping -t localhost|cmd /q /v /c "(pause&pause)>nul & for /l %%a in () do (set /p "data=" && echo(!time! !data!)&ping -n 2 localhost>nul"

Two aditional pause commands are included at the start of the subshell (only one can be used, but as pause consumes a input character, a CRLF pair is broken and a line with a LF is readed) to wait for input data, and a ping -n 2 localhost is included to wait a second for each read in the inner loop. The result is a more stable behaviour and less CPU usage.

NOTE: The inner ping can be replaced with a pause, but then the first character of each readed line is consumed by the pause and not retrieved by the set /p

Shroff answered 23/7, 2014 at 9:48 Comment(24)
I've tested with your way however i got %%a was unexpected at this time?Celindaceline
Yes of course..Could it be there's some typo in between?Celindaceline
@Mr.SuicideSheep, this is a batch file. If you want to test it from command line, replace all the double percent signs (that need to be escaped inside batch files) with single percent signs.Shroff
When I try to use this, I end up getting line breaks in the output. They routinely appear after the 52nd character in the output. Any thoughts as to why?Explicate
@Ryan, answer updated. I was using a old XP machine when I included the original code. Tested now in a i3 windows 7 x64 and the cut problem raises. Test new code.Shroff
@AlexG, if you need the date (the original question didn't include it in the desired output), change the echo command to echo(!date! !time! !data!Shroff
no response on ping, so I did control+C and computer got slow, froze then blue screenLudmilla
@Dan, The only way I can think to get a BSOD running this code (discarding hw or driver problems) is a fork bomb. Have you called your batch file ping.bat or ping.cmd?Shroff
@MCND .bat, I tried again on a clean virtual computer, it worked fine. I tried again on my regular system, this time with taskkill ready to run, I got hundreds of cmd.exe instances. I'm sure my system is clean, so it should be a configuration issue. Will look into that, thanks.Ludmilla
I have tried to add the -l 1024 parameter to the ping result but no luck... How to add another parameters? Thanks!Fiveandten
@JorgeCornejoBellido, I've added it to the source ping before the -t without problems.Shroff
ping localhost -n 5 | find /v "" | cmd /q /v:on /c "for /l %a in (0) do (set "data="&set /p "data="&if defined data echo(!date! !time! !data!)" Another 'challenge' is raised. How to eliminate CTRL+C requirement after the 5th ping. Any improvement are welcome.Knutson
it doesn't work anymore, it says "time" instead of the actual timePushbike
@Mike, Tested now. After copy, paste into a batch file and execute (W10.0.15063 64b), it works.Shroff
Windows 7: This completely killed my machine. Kept starting new cmd.exe processe. Don't try this at home!Embry
@Janos, How did you name your batch file?Shroff
Doh! I named it ping.bat. That's a terrible idea, as it causes recursion without running the actual ping command. Thanks for the hint. It seems like the script does work indeed.Embry
If I use this batch and save the output to a txt file, does it record request time outs?Stuff
@DilhanNakandala, The code is not filtering the output of the ping command so request timeouts should be echoed.Shroff
Tried this in Windows 10 with a bat-file. My computer froze like never before. Even taskmanager couldn't kill the process. Had to forcefully restart my computer and lost some other work.Jeannajeanne
@MarcusNyberg, How did you name the batch file?Shroff
@MC ND I named it ping.bat . If the naming is causing the freezing-problem you should add that as a Note. "Do not name the bat file ping.bat it will crash your computer"Jeannajeanne
@MarcusNyberg, It is not just ping.bat. The problem is that the script code calls ping (and cmd). As your file is also called ping, it will call itself again, and again,... Can it be avoided? Yes, we can use full paths for each invoked command. Why did I not include them? Because it is just sample code explaining the concept, not a bulletproof solution (it is very, very far from it).Shroff
@MCND I know this is a long shot, but how would you extend the example if you wanted to call a different batch file when a timeout happened? The second batch file would be one with network diagnostic functions, and it would save to a different log file. I've been trying to implement this from scratch, and also to adapt your example. So far, unsuccessfully.Varhol
E
153

WindowsPowershell:

option 1

ping.exe -t COMPUTERNAME|Foreach{"{0} - {1}" -f (Get-Date),$_}

option 2

Test-Connection -Count 9999 -ComputerName COMPUTERNAME | Format-Table @{Name='TimeStamp';Expression={Get-Date}},Address,ProtocolAddress,ResponseTime
Ezequieleziechiele answered 14/11, 2016 at 14:39 Comment(7)
Worked beautifully without any of the infinite loop/max cpu issues of the other suggestions.Russi
Test-Connection -Count 9999 -ComputerName google.com | Format-Table @{Name='TimeStamp';Expression={Get-Date}},Address,ProtocolAddress,ResponseTime | tee -file C:\Users\yourname\Desktop\pingtest.txt -appendRussi
simple and crisp solution. first option worked for mePercuss
If you want to paste Option 2 straight into a PowerShell prompt, you can omit the -ComputerName bit, and it will prompt you for list of ComputerNames (just leave the second one blank). Test-Connection -Count 9999 | Format-Table @{Name='TimeStamp';Expression={Get-Date}},Address,ProtocolAddress,ResponseTimeChecker
Option 1 is a winner over Option 2 if ping requests time out because Option 2 outputs a PowerShell exception instead of "Request timed out.".Sagacious
Extending the Options above with > C:\temp\ping.txt redirects the output to a file. If you want to see the live output as well, simply execute Get-Content C:\temp\ping.txt -tail 10 -wait in another PowerShell.Sagacious
both option are working great in WindowsPowershell. But the ping statistic summary is missing. Would it be possible to get a continously ping with timestamps and the ping statistic summary at the end?Wolters
S
112
@echo off
    ping -t localhost|find /v ""|cmd /q /v:on /c "for /l %%a in (0) do (set "data="&set /p "data="&if defined data echo(!time! !data!)" 

note: code to be used inside a batch file. To use from command line replace %%a with %a

Start the ping, force a correct line buffered output (find /v), and start a cmd process with delayed expansion enabled that will do an infinite loop reading the piped data that will be echoed to console prefixed with the current time.

2015-01-08 edited: In faster/newer machines/os versions there is a synchronization problem in previous code, making the set /p read a line while the ping command is still writting it and the result are line cuts.

@echo off
    ping -t localhost|cmd /q /v /c "(pause&pause)>nul & for /l %%a in () do (set /p "data=" && echo(!time! !data!)&ping -n 2 localhost>nul"

Two aditional pause commands are included at the start of the subshell (only one can be used, but as pause consumes a input character, a CRLF pair is broken and a line with a LF is readed) to wait for input data, and a ping -n 2 localhost is included to wait a second for each read in the inner loop. The result is a more stable behaviour and less CPU usage.

NOTE: The inner ping can be replaced with a pause, but then the first character of each readed line is consumed by the pause and not retrieved by the set /p

Shroff answered 23/7, 2014 at 9:48 Comment(24)
I've tested with your way however i got %%a was unexpected at this time?Celindaceline
Yes of course..Could it be there's some typo in between?Celindaceline
@Mr.SuicideSheep, this is a batch file. If you want to test it from command line, replace all the double percent signs (that need to be escaped inside batch files) with single percent signs.Shroff
When I try to use this, I end up getting line breaks in the output. They routinely appear after the 52nd character in the output. Any thoughts as to why?Explicate
@Ryan, answer updated. I was using a old XP machine when I included the original code. Tested now in a i3 windows 7 x64 and the cut problem raises. Test new code.Shroff
@AlexG, if you need the date (the original question didn't include it in the desired output), change the echo command to echo(!date! !time! !data!Shroff
no response on ping, so I did control+C and computer got slow, froze then blue screenLudmilla
@Dan, The only way I can think to get a BSOD running this code (discarding hw or driver problems) is a fork bomb. Have you called your batch file ping.bat or ping.cmd?Shroff
@MCND .bat, I tried again on a clean virtual computer, it worked fine. I tried again on my regular system, this time with taskkill ready to run, I got hundreds of cmd.exe instances. I'm sure my system is clean, so it should be a configuration issue. Will look into that, thanks.Ludmilla
I have tried to add the -l 1024 parameter to the ping result but no luck... How to add another parameters? Thanks!Fiveandten
@JorgeCornejoBellido, I've added it to the source ping before the -t without problems.Shroff
ping localhost -n 5 | find /v "" | cmd /q /v:on /c "for /l %a in (0) do (set "data="&set /p "data="&if defined data echo(!date! !time! !data!)" Another 'challenge' is raised. How to eliminate CTRL+C requirement after the 5th ping. Any improvement are welcome.Knutson
it doesn't work anymore, it says "time" instead of the actual timePushbike
@Mike, Tested now. After copy, paste into a batch file and execute (W10.0.15063 64b), it works.Shroff
Windows 7: This completely killed my machine. Kept starting new cmd.exe processe. Don't try this at home!Embry
@Janos, How did you name your batch file?Shroff
Doh! I named it ping.bat. That's a terrible idea, as it causes recursion without running the actual ping command. Thanks for the hint. It seems like the script does work indeed.Embry
If I use this batch and save the output to a txt file, does it record request time outs?Stuff
@DilhanNakandala, The code is not filtering the output of the ping command so request timeouts should be echoed.Shroff
Tried this in Windows 10 with a bat-file. My computer froze like never before. Even taskmanager couldn't kill the process. Had to forcefully restart my computer and lost some other work.Jeannajeanne
@MarcusNyberg, How did you name the batch file?Shroff
@MC ND I named it ping.bat . If the naming is causing the freezing-problem you should add that as a Note. "Do not name the bat file ping.bat it will crash your computer"Jeannajeanne
@MarcusNyberg, It is not just ping.bat. The problem is that the script code calls ping (and cmd). As your file is also called ping, it will call itself again, and again,... Can it be avoided? Yes, we can use full paths for each invoked command. Why did I not include them? Because it is just sample code explaining the concept, not a bulletproof solution (it is very, very far from it).Shroff
@MCND I know this is a long shot, but how would you extend the example if you wanted to call a different batch file when a timeout happened? The second batch file would be one with network diagnostic functions, and it would save to a different log file. I've been trying to implement this from scratch, and also to adapt your example. So far, unsuccessfully.Varhol
A
78

You can do this in Bash (e.g. Linux or WSL):

ping 10.0.0.1 | while read line; do echo `date` - $line; done

Although it doesn't give the statistics you usually get when you hit ^C at the end.

Arcature answered 24/5, 2017 at 9:50 Comment(7)
This is best so farPortiaportico
Works perfectlly!!Calcimine
This does NOT work on Windows, as was asked in the question.Embry
This works just fine on Windows, under Windows Subsystem for Linux (WSL) which is an optional feature.Amenity
I had been trying to log ping results. date +%s is more helpful as it shows integer timestamps.Bonnell
@Embry : This works in Windows. Please use Windows PowerShell.Unappealable
-D Print timestamp (unix time + microseconds as in gettimeofday) before each line. You can update this, ping now comes built-in with this functionality.Nepali
S
32

Batch script:

@echo off

set /p host=host Address: 
set logfile=Log_%host%.log

echo Target Host = %host% >%logfile%
for /f "tokens=*" %%A in ('ping %host% -n 1 ') do (echo %%A>>%logfile% && GOTO Ping)
:Ping
for /f "tokens=* skip=2" %%A in ('ping %host% -n 1 ') do (
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A>>%logfile%
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A
    timeout 1 >NUL 
    GOTO Ping)

This script will ask for which host to ping. Ping output is output to screen and log file. Example log file output:

Target Host = www.nu.nl
Pinging nu-nl.gslb.sanomaservices.nl [62.69.166.210] with 32 bytes of data: 
24-Aug-2015 13:17:42 Reply from 62.69.166.210: bytes=32 time=1ms TTL=250
24-Aug-2015 13:17:43 Reply from 62.69.166.210: bytes=32 time=1ms TTL=250
24-Aug-2015 13:17:44 Reply from 62.69.166.210: bytes=32 time=1ms TTL=250

Log file is named LOG_[hostname].log and written to same folder as the script.

Sherrillsherrington answered 24/8, 2015 at 15:8 Comment(11)
keeps saying sleep is not recognized but the script works fine. How do I stop the result from keeping echoing in the cmd window and just keep only going to the log file?Tautomerism
You should download and extract sleep.zip to the same folder as from where you execute the batch file. The sleep command forces the script to wait 1 second after each ping. Without it, there is no pause between 'pings' and your logfile will grow very fast. To prevent showing results in the cmd window, you can remove the last line from the script that starts with the word "echo"Sherrillsherrington
@Sherrillsherrington sometimes 'sleep 1 >NUL' not works(not recognized command), i used 'timeout 1 >NUL'Rebate
@Asprelis: That's awesome. Thanx for the tip. I was unaware of the existence of the "timeout" command. I agree that its much nicer to use commands that are included with the OS.Sherrillsherrington
I tested the script. Work fine, but you must add one space char in 3. line after set and before /p.Betti
@mika Thanx for your suggestion. I've corrected the code.Sherrillsherrington
@Sherrillsherrington Thanks for this! What will it do if a ping takes multiple seconds to resolve, or times out completely?Condorcet
@Janos: Can you provide me with more details, of what is/isn't working? Do you receive an error message?Sherrillsherrington
As of September 8 2018, the posted code works perfectly for me on Windows 10 without changes. Thanks!Dys
It's November 2019 and still it works perfectly without any modifications on Windows 10.Tomato
It's July 2022 and still it is working perfectly without any modifications on Windows 10.Darlinedarling
U
27

This might help someone : [Needs to be run in Windows PowerShell]

ping.exe -t 10.227.23.241 |Foreach{"{0} - {1}" -f (Get-Date),$_} >> Ping_IP.txt

-- Check for the Ping_IP.txt file at the current directory or user home path.

The above command gives you output in a file like the below ;

9/14/2018 8:58:48 AM - Pinging 10.227.23.241 with 32 bytes of data:
9/14/2018 8:58:48 AM - Reply from 10.227.23.241: bytes=32 time=29ms TTL=117
9/14/2018 8:58:49 AM - Reply from 10.227.23.241: bytes=32 time=29ms TTL=117
9/14/2018 8:58:50 AM - Reply from 10.227.23.241: bytes=32 time=28ms TTL=117
9/14/2018 8:58:51 AM - Reply from 10.227.23.241: bytes=32 time=27ms TTL=117
9/14/2018 8:58:52 AM - Reply from 10.227.23.241: bytes=32 time=28ms TTL=117
9/14/2018 8:58:53 AM - Reply from 10.227.23.241: bytes=32 time=27ms TTL=117
9/14/2018 8:58:54 AM - Reply from 10.227.23.241: bytes=32 time=28ms TTL=117

Good Luck !!!

Unappealable answered 30/8, 2018 at 13:52 Comment(2)
This solution is identical to one provided in an earlier answer to this question.Booth
@Booth : it is a little different as it is also saving to file that can be later used.Unappealable
V
8

This might fit the bill for later Windows versions:

for /l %i in (1,0,2) do @echo|cmd /v:on /c set /p=!time! & ping -n 1 10.21.11.81 | findstr "Reply timed" && timeout /t 2 > nul:
Vulture answered 30/10, 2019 at 14:48 Comment(2)
this is exactly what I am looking for! thank you...works perfectly. i get the time and then the output i would expect from a ping line by lineCristobal
is this time from server or from client?Gurias
E
6

On Windows

You can use one of the other answers.

On Unix/Linux

while :;do ping -n -w1 -W1 -c1 10.21.11.81| grep -E "rtt|100%"| sed -e "s/^/`date` /g"; sleep 1; done

Or as function pingt for your ~/.bashrc:

pingt() {
  while :;do ping -n -w1 -W1 -c1 $1| grep -E "rtt|100%"| sed -e "s/^/`date` /g"; sleep 1; done
}

source: https://mcmap.net/q/182090/-how-do-i-timestamp-every-ping-result

Equilibrate answered 10/8, 2015 at 6:29 Comment(1)
On Mac, -w is an invalid option to ping.Yellowweed
H
5

I think my code its what everyone need:

ping -w 5000 -t -l 4000 -4 localhost|cmd /q /v /c "(pause&pause)>nul &for /l %a in () do (for /f "delims=*" %a in ('powershell get-date -format "{ddd dd-MMM-yyyy HH:mm:ss}"') do (set datax=%a) && set /p "data=" && echo([!datax!] - !data!)&ping -n 2 localhost>nul"

to display:

[Fri 09-Feb-2018 11:55:03] - Pinging localhost [127.0.0.1] with 4000 bytes of data:
[Fri 09-Feb-2018 11:55:05] - Reply from 127.0.0.1: bytes=4000 time<1ms TTL=128
[Fri 09-Feb-2018 11:55:08] - Reply from 127.0.0.1: bytes=4000 time<1ms TTL=128
[Fri 09-Feb-2018 11:55:11] - Reply from 127.0.0.1: bytes=4000 time<1ms TTL=128
[Fri 09-Feb-2018 11:55:13] - Reply from 127.0.0.1: bytes=4000 time<1ms TTL=128

note: code to be used inside a command line, and you must have powershell preinstalled on os.

Handkerchief answered 9/2, 2018 at 9:58 Comment(0)
S
2

Try this:

Create a batch file with the following:

echo off

cd\

:start

echo %time% >> c:\somedirectory\pinghostname.txt

ping pinghostname >> c:\somedirectory\pinghostname.txt

goto start

You can add your own options to the ping command based on your requirements. This doesn't put the time stamp on the same line as the ping, but it still gets you the info you need.

An even better way is to use fping, go here http://www.kwakkelflap.com/fping.html to download it.

Stalinabad answered 3/6, 2015 at 15:9 Comment(1)
404 on that link nowDewayne
R
2

Use

ping -D 8.8.8.8

From the man page

-D     Print timestamp (unix time + microseconds as in gettimeofday) before each line

Output

[1593014142.306704] 64 bytes from 8.8.8.8: icmp_seq=2 ttl=120 time=13.7 ms
[1593014143.307690] 64 bytes from 8.8.8.8: icmp_seq=3 ttl=120 time=13.8 ms
[1593014144.310229] 64 bytes from 8.8.8.8: icmp_seq=4 ttl=120 time=14.3 ms
[1593014145.311144] 64 bytes from 8.8.8.8: icmp_seq=5 ttl=120 time=14.2 ms
[1593014146.312641] 64 bytes from 8.8.8.8: icmp_seq=6 ttl=120 time=14.8 ms
Rollin answered 24/6, 2020 at 15:58 Comment(0)
T
2
ping -t wwww.google.com|cmd /q /v /c "(pause&pause)>nul & for /l %a in () do (set /p "data=" && echo(!date! !time! !data!)&ping -n 2 wwww.google.com>nul"
Tameshatamez answered 14/7, 2021 at 1:32 Comment(2)
please make sure the edited content is correctAssured
While this code may solve the question, including an explanation of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please edit your answer to add explanations and give an indication of what limitations and assumptions apply.Ectoparasite
O
1

Try this instead:

ping -c2 -s16 sntdn | awk '{print NR " | " strftime("%Y-%m-%d_%H:%M:%S") " | " $0  }'

Check if it suits you

Orchestrion answered 14/3, 2017 at 17:32 Comment(1)
Perdona, coloqué "un alias de servidor" coloca la direcciónIP en lugar de la cadena "sntdn", saludosOrchestrion
R
1

I also need this to monitor the network issue for my database mirroring time out issue. I use the command code as below:

ping -t Google.com|cmd /q /v /c "(pause&pause)>nul & for /l %a in () do (set /p "data=" && echo(!date! !time! !data!)&ping -n 2 Google.com>nul" >C:\pingtest.txt

You just need to modify Google.com to your server name. It works perfectly for me. and remember to stop this when you finished. The pingtest.txt file will increase by 4.5 KB per min (around).

Thank for raymond.cc. https://www.raymond.cc/blog/timestamp-ping-with-hrping/

Rameriz answered 15/9, 2017 at 13:46 Comment(0)
R
1

Instead of having the additional ping -n 2 localhost at the end of the loop, you can just add the character R before !data! since the only possibilities are Reply or Request. The first character is consumed from the pause>nul. So instead of having the following expression:

ping localhost -t -l 4|cmd /q /v /c "(pause&pause)>nul & for /l %%a in () do (set /p data=&echo(!date! !time! !data!)&ping -n 2 localhost>nul"

You can use this expression:

ping localhost -t -l 4|cmd /q /v /c "(pause&pause)>nul & for /l %%a in () do (set /p data=&echo(!date! !time! R!data!)&pause>nul"

Which produces the same output eg.:

22:34:49.49 Reply from 172.217.4.46: bytes=4 time=14ms TTL=116
22:34:50.49 Reply from 172.217.4.46: bytes=4 time=14ms TTL=116
22:34:55.47 Request timed out.
22:34:56.49 Reply from 172.217.4.46: bytes=4 time=14ms TTL=116
22:34:57.49 Reply from 172.217.4.46: bytes=4 time=14ms TTL=116
Recrimination answered 15/6, 2020 at 2:55 Comment(0)
I
0

Another powershell method (I only wanted failures)

$ping = new-object System.Net.NetworkInformation.Ping
$target="192.168.0.1"
Write-Host "$(Get-Date -format 's') Start ping to $target"
while($true){
    $reply = $ping.send($target)
    if ($reply.status -eq "Success"){
        # ignore success    
        Start-Sleep -Seconds 1
    }
    else{
        Write-Host "$(Get-Date -format 's') Destination unreachable" $target

    }
}
Illailladvised answered 15/9, 2017 at 12:28 Comment(0)
Z
0

An enhancement to MC ND's answer for Windows.
I needed a script to run in WinPE, so I did the following:

@echo off
SET TARGET=192.168.1.1
IF "%~1" NEQ "" SET TARGET=%~1

ping -t %TARGET%|cmd /q /v /c "(pause&pause)>nul & for /l %%a in () do (set /p "data=" && echo(!time! !data!)&ping -n 2 localhost >nul"

This can be hardcoded to a particular IP Address (192.168.1.1 in my example) or take a passed parameter. And as in MC ND's answer, repeats the ping about every 1 second.

Zoezoeller answered 14/6, 2018 at 15:39 Comment(0)
P
0

Simple 😎:

@echo off

set hostName=www.stackoverflow.com
set logfile=C:\Users\Dell\Desktop\PING_LOG\NetworkLog\Log_%hostName%.text
echo Network Loging Running %hostName%...
echo Ping Log %hostName% >>%logfile%

:Ping
for /f "tokens=* skip=2" %%A in ('ping %hostName% -n 1 ') do (
    echo %date% %time:~0,2%:%time:~3,2%:%time:~6,2% %%A>>%logfile%
    timeout 1 >NUL
    GOTO Ping)
Pacific answered 6/1, 2020 at 17:27 Comment(0)
W
0

Here's one liner for Windows CMD , that writes in a file with timestamp (with infinite loop on ping)

FOR /L %N IN () DO date /t >>ping.txt && time /t >>ping.txt && ping google.com -n 4 >>ping.txt

Here's a version that pings only 4 times with timestamp :

date /t >>ping.txt && time /t >>ping.txt && ping google.com -n 4 >>ping.txt
Writhen answered 28/3, 2023 at 15:23 Comment(0)
D
-1

Try this on windows powershell. just change 'ADDRESS' to either an IP or a URL(e.g google.com, facebook.com)

ping.exe -t ADDRESS|Foreach{"{0} - {1}" -f (Get-Date),$_}
Demetrademetre answered 29/1 at 8:21 Comment(2)
how is this different from this answer?Prohibitive
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Eggett

© 2022 - 2024 — McMap. All rights reserved.