There comes a time when you experience unfortunate network issues, this could widely encounter at any big company or could also happen at your home when you try to access any system or hardware over a network. There are different types of network issues such as completely drained network, intermittent network, connectivity issues due to the network cache, and so on.
Whatever the reason is, the “ping” command is used to compile the communication or connectivity path from your computer to another device. You can say that pining is an alternate method to troubleshoot network connectivity issues.
In this article, we will show you how to use the continuous ping command. Make sure to read on the post till the end in order to get to know more about ping for continuous tests.
Continuous ping on Windows OS
Mind you, this method is also applicable to Windows 7, 8, and 10. Follow the steps and instructions mentioned below to ping on Windows for continuous testing.
Step 1: Do a right-click on the Start icon and select Command Prompt (Admin), you can also press Windows + R keys to open the Run box and type “CMD” and press enter to open the Command Prompt.
Step 2: Now just type the following command and enter the IP address, and press Enter.
ping -t 93.145.567.67
Here, we need to type -t and after the ping mention the address after it. The command will be executed and runs in an endless loop.
Ping moves the data packets in the default setting to obtain the specific IP address or any hostname. The packets are received as an incoming response, ping registers, and enter on the standard output(stdout). The data or information will directly into the terminal, which also consists of the IP address of a computer that is pinged. The echo packets are continuously sent off each second to the target computer until you end the loop of the commands.
To end the loop: press Ctrl + C, the statistical summary also known as ping statistics will appear a conclusion once the loop is ended.
Let’s it known that you can also redirect standard output to a text file (only when it’s needed). For that, you need to add the correct operator like greater than symbol along with the file name with the extension.
ping -t 93.145.567.67 > logfile.txt
The file will be automatically generated if it’s not found under a specified file name. You will get information like incoming data packets and ping statistics on the text file that you have mentioned in the command.
Continious ping on macOS
Follow the steps and instructions to execute the command as a continuous ping:
Step 1: Open the Terminal on macOS, you will get it under the Applications folder.
Step 2: Type the following command and press Enter.
To redirect the standard output to a text file, type the following command:
Ping -c 4 93.145.567.67
Here, -c shall be given after Ping and then IP address.
Continuous ping on Linux
Mind you, the ping command already runs on loops in the default setting on Linux. To perform a continuous ping test in a Linux system, users must do the following:
Step 1: Open the Terminal in Ubuntu, press Ctrl + Alt +T.
Step 2: Enter the following command and mention the IP address after it and press Enter.
The standard output is redirected similarly to Windows OS.
ping 93.145.567.67.34 > logfile.txt
To have continuous ping to register or issue a timestamp, you can use the -D option.
ping -D 93.145.567.67> logfile.txt
To end the ping from the endless loop in Linux, you can use the –c option.
Ping -c 4 93.145.567.67
If you want to get know more details about the ping command in Windows, macOS, and Linux. Check out your operating system’s manual. Type man ping in the terminal to open the manual page.
That’s it for now, hope this helps! We are glad to know your thoughts in the comment section below. Till then, stay tuned for more info.