Wednesday, August 23, 2017

Get Response Time with Curl - curltime

Save this script in your path  (echo $PATH) as curltime:

#!/bin/bash

/usr/bin/curl -o /dev/null \
-s -w "    time_namelookup:  %{time_namelookup}\n       time_connect:  %{time_connect}\n    time_appconnect:  %{time_appconnect}\n   time_pretransfer:  %{time_pretransfer}\n      time_redirect:  %{time_redirect}\n time_starttransfer:  %{time_starttransfer}\n                    ----------\n         time_total:  %{time_total}\n" \
$1


Make it executable

chmod 0755 /usr/local/bin/curltime


Now you can use it to check the response time of an url. Ex:

curltime https://marca.com

Source: based on https://viewsby.wordpress.com/2013/01/07/get-response-time-with-curl/

2 comments:

  1. Wow! wonderful blog post, you. Sincere appreciation for doing it. This website offers some very useful information about Another Step Forward for VPS Web Server in Market. Contact us to learn more about our services if you're seeking for the quickest and most inexpensive Dubai VPS Server.

    ReplyDelete
  2. Your excellent guidelines will be of great help to many. Nice post. I enjoyed reading it. Thanks! You get the world wide web host services in India VPS Server.

    ReplyDelete