Saturday, October 10, 2020

How to test Website speed in Linux/macOS Terminal


If you want to test your website's speed in different countries and locations, you can use the sites in the Website Speed Test on the page below. 

Online Network Tools for Network Engineers


However, if you have a web server at the headquarters and measure the speed at a specific branch, you can simply measure it in the following way.

▶ Method 1 (with wget)


I used the /dev/null parameter since I don't need to save the file while measuring it. This way, you can only measure the speed without downloading the file.

MBPr:/Users/AnalysisMan/Downloads% wget -O /dev/null http://192.168.1.110:8000/GNS3.VM.VMware.ESXI.2.2.15.zip

--2020-10-16 22:53:29-- http://192.168.1.110:8000/GNS3.VM.VMware.ESXI.2.2.15.zip
Connecting to 192.168.1.110:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 570572968 (544M) [application/zip]
Saving to: '/dev/null'

100%[================================================================================>] 570,572,968 5.45MB/s in 1m 46s

2020-10-16 22:55:15 (5.14 MB/s) - '/dev/null' saved [570572968/570572968]



By default, the result's speed displays as Bytes/second. You may add '--report-speed=bits' at the end of the command to get the result with Bits/second, which is generally used in the networking world.

MBPr:/Users/AnalysisMan/Downloads% wget -O /dev/null http://192.168.1.110:8000/GNS3.VM.VMware.ESXI.2.2.15.zip --report-speed=bits

--2020-10-16 23:00:06-- http://192.168.1.110:8000/GNS3.VM.VMware.ESXI.2.2.15.zip
Connecting to 192.168.1.110:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 570572968 (544M) [application/zip]
Saving to: '/dev/null'

100%[================================================================================>] 570,572,968 46.4Mb/s in 1m 50s

2020-10-16 23:01:56 (41.5 Mb/s) - '/dev/null' saved [570572968/570572968]



▶ Method 2 (with curl)

You may use the curl command as well.


curl -o /dev/null http://192.168.1.110:8000/GNS3.VM.VMware.ESXI.2.2.15.zip

MBPr:/Users/AnalysisMan/Downloads% curl -o /dev/null http://192.168.1.110:8000/GNS3.VM.VMware.ESXI.2.2.15.zip

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
15 544M 15 85.8M 0 0 5502k 0 0:01:41 0:00:15 0:01:26 6137k



▶ Related article: How to set up a Web Server on macOS

 

No comments: