Jan 20

Curl is a great little program that can be used to fetch content from webservers. It’s options are expansive, but at it’s most basic curl is used to fetch data from a web server. One of my most used features of curl is it’s ability to log output in a very granular manner, separating out how much time it took to get the dns resolution from the dns server, how long it took to connect to the server, how long to negotiate the http protocol, etc.  The curl manpage will show all the data that curl can display, but my favourites are Total transaction time, Time it took to get DNS resolution and the time it took to connect to the webserver. This pretty much tells me at a glance where the slow down might be with a single command.  The command I run looks like this

curl ‘http://www.cyborgworkshop.org’ -w ‘Total time: %{time_total}, Time in DNS: %{time_namelookup}, Time to Connect time: %{time_connect}\n’

And the output looks like this

Total time: 1.842, Time in DNS: 0.002, Time to Connect time: 0.016

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.