Measuring website latency with http_ping

A year or so ago, I modified my ldap-ping.pl script to create a script (http-ping.pl) that would measure the time it took to retrieve a specific URI from a web server. While scouring the OpenBSD ports collection for website monitoring tools, I came across http_ping. This is a great tool for measuring the time it takes to retrieve a URI, and is a far superior tool to the one I wrote. Here is an example of http_ping in action:

$ http_ping http://prefetch.net/

6220 bytes from http://prefetch.net/: 290.232 ms (79.652c/89.816r/120.764d)
6220 bytes from http://prefetch.net/: 281.06 ms (70.564c/90.036r/120.46d)
6220 bytes from http://prefetch.net/: 281.274 ms (70.968c/89.61r/120.696d)
6220 bytes from http://prefetch.net/: 290.858 ms (80.459c/89.81r/120.589d)
^C
--- http://prefetch.net/ http_ping statistics ---
4 fetches started, 4 completed (100%), 0 failures (0%), 0 timeouts (0%)
total    min/avg/max = 281.06/285.856/290.858 ms
connect  min/avg/max = 70.564/75.4108/80.459 ms
response min/avg/max = 89.61/89.818/90.036 ms
data     min/avg/max = 120.46/120.627/120.764 ms

There are all kinds of nifty pieces of software stashed away in the OpenBSD ports collection, and I am on a mission to locate and blog about each and every one of them! :)

One Comment

Alexandro  on June 30th, 2010

Hi Matty,

I’d like to log an FTP server performance using your script. What needs to be changed in the script to make it work with FTP?

Leave a Comment