Q. I can measure network throughput and packet loss using standard UNIX / Linux command line utilities. How do I find out the lateceny and throughput of a web server like Apache under Linux?

Adblock detected 😱

My website is made possible by displaying online advertisements to my visitors. I get it! Ads are annoying but they help keep this website running. It is hard to keep the site running and producing new content when so many people block ads. Please consider donating money to the nixCraft via PayPal/Bitcoin, or become a supporter using Patreon.

A. You need to use the program called httping. It allows you to measure the latency of a webserver and the throughput.

Task: Ping the webserver on host www.cyberciti.biz

Use the following command for measuring the latency. Press CTRL+c to exit the program. It will display a summary of what was measured.$ httping -g http://www.cyberciti.biz Output:

The -g url option use selects the url to probe / ping. You can also specify the port with -p port option:$ httping -g http://www.cyberciti.biz -p 81 You can also connect using SSL, for this to work you need to give a https url or a 443 portnumber:$ httping -l -g https://www.cyberciti.biz OR$ httping -g http://www.cyberciti.biz -p 443

Task: Measure throughput of a webserver

The -G option force GET request instead of a HEAD request – this means that also the complete page/file must be transferred. You also need to pass the -b option with -G option to get the transferspeed (in KB/s).$ httping -Gbg http://www.cyberciti.biz/ Output:

Test remote server CPU

The -B option along with -G option ask the HTTP server to compress the returned data – this will reduce the influence of the bandwidth of your connection while increasing the influence of the processorpower of the HTTP server.$ httping -BGg http://www.cyberciti.biz/

Flood Webserver

The -f option used to flood ping i.e. do not sit idle between each ping but ping as fast as the computer and network allow you to (don’t run this on production or 3rd party servers):$ httping -fg http://www.cyberciti.biz/

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Your support makes a big difference:

I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft takes a lot of my time and hard work to produce. If everyone who reads nixCraft, who likes it, helps fund it, my future would be more secure. You can donate as little as $1 to support nixCraft: