jump to navigation

Testing HTTP Throughput and latency with httping February 21, 2011

Posted by Tournas Dimitrios in Linux admin tools.

Most of us (myself included) run for ping and traceroute whenever we have an issue with connectivity – but ping and traceroute rely on icmp being permitted on the routers or hosts that you are traversing to reach your final destination and many firewalls blocks these.This is where we bring in httping . Httpping work on almost all unix based system like Linux and BSD family , it’s an excellent utility for measuring HTTP server throughput and latency, and because it’s a tiny command-line tool, you can easily run it from multiple locations via SSH.

httping can also access alternative ports BUT remember it is still making http-requests.. so, it won’t help checking your mail server. We can use Telnet for a quick check on most other ports – but specifically, httping helps us check latency in this scenario.

If you need a constant graphed monitoring solution for the same, checkout Smokeping

Installing httping on your Linux box :You could of course get the source code and compile it , but many repositories provide ready-made packages for RedHat based boxes . I have added rpmforge to my repo-list , so the installation was made with the yum installer : yum install httping -y

httping  options
-g url This selects the url to probe. E.g.: http://localhost/
-h hostname Instead of ‘-g’ one can also set a hostname to probe with -h: -h
-c count How many probes to send before exiting.
-i interval How many seconds to sleep between every probe sent.
-G Do a GET request instead of a HEAD request: this means that also
the complete page/file must be transferred. Note that in this
case you’re no longer measuring the latency!
-l Connect using SSL: for this to work you need to give a
‘https’-url or a 443 portnumber.
-z When connecting using SSL, display the fingerprint of the X509
certificate(s) of the peer.


Practical examples

  • Ping the webserver on host ‘localhost’
  • httping -g http://localhost/

  • Ping the webserver on host ‘localhost’ and port- number 8080
  • httping -h localhost -p 8080

  • Ping the webserver on host ‘localhost’ using an SSL connection.
  • httping -l -g https://localhost/

  • Do a GET request instead a HEAD request : this means that also the complete page/file must be transfered . This is the case where you need to measure the throughput of the server and not the latency
    httping  -Gg    http://some-url.com
  • Probe the server “n” times before exiting (default is endless)
    httping    -c5     -g    http://some-url.com

Links :



No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s