PDA

View Full Version : ping alternatives?


ixfd64
03-05-2011, 11:54 PM
I know that ping is a very useful tool for testing the connectivity to a website. However, there's a little problem: some servers are configured to not respond to ICMP requests, in which case the user will get a "Request timed out" message.

If this happens, are there any other ways to see how long it takes to connect to a site? For example, would sending an HTTP request to see how long it takes to load the first X bytes of the home page work in the same manner as ping?

Crosma
03-13-2011, 05:40 AM
crosma@Necktie.local:~$ curl -w "%{time_connect} seconds" -I http://www.3drealms.com/
HTTP/1.1 200 OK
Date: Sun, 13 Mar 2011 10:50:13 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Fri, 03 Sep 2010 19:33:35 GMT
ETag: "60009271-af19-48f6001b341c0"
Accept-Ranges: bytes
Content-Length: 44825
Connection: close
Content-Type: text/html

0.433 seconds

This is only the time it took to connect to the server. Name resolution, time to send the request, receipt of header and download time are not included. I believe this is the time you want, since it's the most comparable to a ping.

ixfd64
03-27-2011, 12:44 PM
Yeah, that was what I was thinking of. Thanks.