Questions tagged [ping]

Ping is a computer network administration utility used to test the reachability of a host on an Internet Protocol (IP) network and to measure the round-trip time for messages sent from the originating host to a destination computer.

Ping is a computer network administration utility used to test the reachability of a host on an Internet Protocol (IP) network and to measure the round-trip time for messages sent from the originating host to a destination computer. The ping utility uses the network protocol, which is often filtered by firewalls, so its usefulness is usually limited in corporate environments.

Examples

ping -n 5 www.example.com #pings 5 times the server named www.example.com

A domain name or IP address can be used.

See also

References

2853 questions
67
votes
14 answers

Send a ping to each IP on a subnet

Is there a command line based way to send pings to each computer in a subnet? Like for(int i = 1; i < 254; i++) ping(192.168.1.i); to enforce arp resolution?
bot47
  • 1,458
  • 3
  • 18
  • 36
60
votes
10 answers

Fastest way to ping a network range and return responsive hosts?

Constraints: 1. Speed matters. 2. I am allowed to ping once. I'm debating whether to use Python or shellscripting. Is there a method faster than bash? Here is the current code, for ip in $(seq int1 int2); do ping -c 1 xxx.xxx.xxx.$ip | grep…
user1552586
54
votes
13 answers

How to check if ping responded or not in a batch file

I want to continuously ping a server and see a message box when ever it responds i.e. server is currently down. I want to do it through batch file. I can show a message box as said here Show a popup/message box from a Windows batch file and can ping…
IsmailS
  • 10,797
  • 21
  • 82
  • 134
50
votes
8 answers

Is there a way to take an argument in a callable method?

I have created a piece of code which takes an IP address (from main method in another class) and then loops through a range of IP addresses pinging each one as it goes. I have a GUI front end on this and it was crashing (hence why I've done the…
DMo
  • 591
  • 2
  • 6
  • 13
46
votes
9 answers

How can I ping a server port with PHP?

I want a PHP script which allows you to ping an IP address and a port number (ip:port). I found a similar script but it works only for websites, not ip:port.
user1288533
  • 463
  • 1
  • 4
  • 5
43
votes
4 answers

Pinging from a C/C++ program

I want to write a C or C++ program, that given an IP address, Pings it and then performs further action based on whether the Ping was successful or not. How to do this?
Vishal
  • 989
  • 2
  • 11
  • 19
40
votes
3 answers

Why can I ping a server but not connect via SSH?

When I ping my server, it responds: user@localhost:~$ ping my.server PING my.server (111.111.111.11) 56(84) bytes of data. 64 bytes from my.server (111.111.111.11): icmp_req=1 ttl=42 time=38.4 ms 64 bytes from my.server (111.111.111.11): icmp_req=2…
Abe
  • 12,956
  • 12
  • 51
  • 72
38
votes
5 answers

Which Protocols are used for PING?

Okay, I know that the answer to this question is ICMP - all my textbooks are saying so, the Internet is saying so, everyone is saying so... except for my TA. According to this TA ping is used not only with ICMP, but also IP, arp, and some other.…
Izumi
  • 571
  • 1
  • 7
  • 16
34
votes
8 answers

curl and ping - how to check whether a website is either up or down?

I want to check whether a website is up or down at a particular instance using PHP. I came to know that curl will fetch the contents of the file but I don't want to read the content of the website. I just want to check the status of the website. Is…
brainless
  • 5,698
  • 16
  • 59
  • 82
33
votes
16 answers

How can I write a Linux bash script that tells me which computers are ON in my LAN?

How can I write a Linux Bash script that tells me which computers are ON in my LAN? It would help if I could give it a range of IP addresses as input.
Dumb Questioner
  • 2,147
  • 4
  • 20
  • 21
33
votes
9 answers

Calculate upload/download speed by ping

How to calculate the speed of an internet connection by some average ping rates.What are the calculations involved in it.IS it possible to calculate upload/download limit by ping rate EDIT If ping is not a solution what else is?
Hulk
  • 32,860
  • 62
  • 144
  • 215
33
votes
7 answers

TraceRoute and Ping in C#

Does anyone have C# code handy for doing a ping and traceroute to a target computer? I am looking for a pure code solution, not what I'm doing now, which is invoking the ping.exe and tracert.exe program and parsing the output. I would like…
NET789
30
votes
2 answers

bash script use cut command at variable and store result at another variable

I have a config.txt file with IP addresses as content like this 10.10.10.1:80 10.10.10.13:8080 10.10.10.11:443 10.10.10.12:80 I want to ping every ip address in that file #!/bin/bash file=config.txt for line in `cat $file` do ##this line is not…
CodingYourLife
  • 7,172
  • 5
  • 55
  • 69
29
votes
9 answers

How to do a true Java ping from Windows?

I have a device on a network that I am attempting to ping through my Java program. Through my windows command prompt, I can ping the device address fine and do a tracert on the address fine. Online, I have seen that in order to do a ping through…
Stephen Watkins
  • 25,047
  • 15
  • 66
  • 100
29
votes
3 answers

How to decide the Ping interval for websocket connection

I understand the Ping is to help prevent proxies from closing idle connections. Is there any guidelines w.r.t. how often to ping? Once every second? 10 seconds? Minute? Does it even matter? A preliminary google search gives me nothing, and the…
Li Haoyi
  • 15,330
  • 17
  • 80
  • 137