[Linux] curl을 이용하여 구간별 응답시간 체크하기

반응형
반응형

 

 

이번 포스팅에서는 curl 을 이용하여 구간별 응답 시간을 확인하는 방법에 대해 남기고자 한다.

 

 

curl_format.txt

          DNS lookup time (s) : %{time_namelookup}s\n
Connection establish time (s) : %{time_connect}s\n 
         SSL connect time (s) : %{time_appconnect}s\n 
        Pre-transfer time (s) : %{time_pretransfer}s\n 
            Redirect time (s) : %{time_redirect}s\n 
      Start-transfer time (s) : %{time_starttransfer}s\n 
----------------------------------------------------\n
               Total time (s) : %{time_total}s\n

 

%{time_namelookup} : it took from the start until the name resolving was completed.
%{time_connect} : it took from the start until the TCP connect to the remote host (or proxy) was completed.
%{time_appconnect} : it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed.
%{time_pretransfer} : it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.
%{time_redirect} : it took for all redirection steps including name lookup, connect, pre-transfer and transfer before the final transaction was started. time_redirect shows the complete execution time for multiple redirections.
%{time_starttransfer} : shows the time, in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also the time the server needed to calculate the result.
%{time_total} : shows the total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.

실행

curl -w "@curl_format.txt" -o /dev/null -s "https://tistory.com"

 

결과

          DNS lookup time (s) : 0.012s
Connection establish time (s) : 0.016s
         SSL connect time (s) : 0.185s
        Pre-transfer time (s) : 0.185s
            Redirect time (s) : 0.000s
      Start-transfer time (s) : 0.190s
 ----------------------------------------------------
              Total time (s) : 0.190s

 

 

반응형

'IT > Linux' 카테고리의 다른 글

openjdk 1.8 설치 - centos7  (0) 2021.02.17
[Rundeck] 런덱 설치하기(on centos7)  (0) 2020.11.11
[Linux] SAMBA(삼바) 설치 및 설정하기  (0) 2020.11.04
[Linux] 루프백(loopback) 설정  (0) 2020.11.03
[Linux] swap 증설  (0) 2020.10.19

댓글

Designed by JB FACTORY

loading