Testing HTTP Throughput and latency with httping February 21, 2011Posted 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
|-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.
httping -g http://localhost/
httping -h localhost -p 8080
httping -l -g https://localhost/