Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
nginx.org/ru/docs/http/ngx_http_upstream_module.ht...
$upstream_response_time
Set the $upstream_response_time variable to the log file format. I have this in /etc/nginx/nginx.conf:
http {
##
# Basic Settings
##
log_format main '$remote_addr:$remote_port - $remote_user [$time_local] $host "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" $request_time-$upstream_response_time';
....
}
cat nginx_access.log | awk -F\" '{print $9}' | grep -v ".--$" | awk -F\- '{print $2}' | sort -n | awk '{all[NR]=$1;} END {print all[int(NR*0.5)]}'
1.391
cat nginx_access.log | awk -F\" '{print $9}' | grep -v ".--$" | wc -l
74557
cat nginx_access.log | awk -F\" '{print $9}' | grep -v ".--$" | awk -F\- '{print $2}' | sort -n | awk '{all[NR]=$1;} END {print all[int(NR*0.85)]}'
1.869
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question