Merry Christmas & Happy 2027! Less downtime. More good times. Celebrating 13 years of sorlavit.com
Skip to content
Sorlavit KimIT Support, Network & Infrastructure Services Let’s talk

ปุ่มแปลไทยจะเปิดบทความผ่าน Google Translate เพื่อแปลอัตโนมัติ โดยคงโค้ดและคำสั่งไว้ตามต้นฉบับ

Network Troubleshooting / IT Support Guides

Measure DNS, TCP and TLS stages with curl

A slow page can spend time resolving a name, establishing transport, negotiating TLS or waiting for the server. Timing a small request helps choose the next investigation.

Compiled for Sorlavit Kim · Published · Updated · 2 min read

Environment and inputs: Mixed platforms · each example identifies its shell or required tool

Try the diagnostic command

Use the stated shell and platform. Replace sample domains, addresses, services and paths with values from the system you are authorized to support.

curl --output /dev/null --silent --show-error --connect-timeout 5 --max-time 20 --write-out 'DNS=%{time_namelookup} TCP=%{time_connect} TLS=%{time_appconnect} FIRST=%{time_starttransfer} TOTAL=%{time_total}
' https://example.com

How to read the result

This Linux shell example prints cumulative elapsed times in seconds. Differences between milestones are more useful than treating every value as an independent duration.

What to do next

Repeat a few permitted requests and compare networks while recording proxy use. Investigate the stage that grows consistently and correlate it with server-side timing.

Before you make a change

This performs a GET and discards the body; use a harmless endpoint. Redirects, connection reuse and proxies affect interpretation, so this is not a full browser performance test.

Share this article

Back to results