找到apache配置文件
netstat -nap | grep 80
# 找到对应端口进程 31114
tcp6 0 0 :::4430 :::* LISTEN 31114/httpd
ps auxf | grep 31114
# 找到对应apache的进程命令中的配置文件*.conf的路径,到指定路径修改配置文件,例如
vim httpd.conf
修改指定端口下的VirtualHost
<VirtualHost 80>
.......
CustomLog "/var/prof.log" "[%a]%{%F %T}t id=%{APIIndex}i time=%D(us) url=%U%q"
</VirtualHost>
指令: CustomLog "/var/prof.log" "[%a]%{%F %T}t id=%{APIIndex}i time=%D(us) url=%U%q"
%D - 官方解释:Time taken to process the request, in millis,处理请求的时间,以微秒为单位
%T - 官方解释:Time taken to process the request, in seconds,处理请求的时间,以秒为单位
%{ms}T - 官方解释:Time taken to commit the response, in millis,提交响应的时间,以毫秒为单位