免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 9371 | 回复: 1
打印 上一主题 下一主题

[Web] nginx 日志中$request_time记录时间为零 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-09-01 18:02 |只看该作者 |倒序浏览
- - - [27/Aug/2011:00:00:01 +0800] "GET /resicon/3339res.png HTTP/1.1" 200 8743 "-" "Dalvik/1.2.0 (Linux; U; Android 2.2.2; ME525 Build/JDGC_2.10.0)" "117.136.19.125" "-" "0.000"
- - - [27/Aug/2011:00:00:01 +0800] "GET /game/20110816/137/\x1A\x1Aqq\x1A\x1A.apk HTTP/1.0" 404 169 "-" "-" "221.179.8.83" "-" "0.000"
- - - [27/Aug/2011:00:00:01 +0800] "GET /resicon_fetch/res_31312431929328.png HTTP/1.1" 200 3745 "-" "Dalvik/1.2.0 (Linux; U; Android 2.2.2; ME525 Build/JDGC_2.10.0)" "116.113.59.16" "-" "0.000"
- - - [27/Aug/2011:00:00:01 +0800] "GET /resicon_fetch/res_41312968367031.png HTTP/1.1" 200 6367 "-" "Dalvik/1.2.0 (Linux; U; Android 2.2.2; ME525 Build/JDGC_2.10.0)" "124.228.57.186" "-" "0.000"
- - - [27/Aug/2011:00:00:01 +0800] "GET /resicon/1313050880192_res.png HTTP/1.1" 200 6815 "-" "Dalvik/1.2.0 (Linux; U; Android 2.2.2; ME525 Build/JDGC_2.10.0)" "221.237.186.100" "-" "0.000"
- - - [27/Aug/2011:00:00:01 +0800] "GET /resicon/1314075841265_res.png HTTP/1.1" 200 12408 "-" "Dalvik/1.2.0 (Linux; U; Android 2.2.2; ME525 Build/JDGC_2.10.0)" "221.237.186.100" "-" "0.000"
- - - [27/Aug/2011:00:00:01 +0800] "GET /resicon/1311336043659_res.png HTTP/1.1" 200 8709 "-" "Dalvik/1.2.0 (Linux; U; Android 2.2.2; ME525 Build/JDGC_2.10.0)" "117.136.0.213" "-" "0.000"
- - - [27/Aug/2011:00:00:01 +0800] "GET /game/20110816/137/\x1A\x1Aqq\x1A\x1A.apk HTTP/1.0" 404 169 "-" "-" "221.179.8.83" "-" "0.000"
- - - [27/Aug/2011:00:00:01 +0800] "GET /resicon/3208res.png HTTP/1.1" 200 9682 "-" "Dalvik/1.2.0 (Linux; U; Android 2.2.2; ME525 Build/JDGC_2.10.0)" "221.237.186.100" "-" "0.000"

访问日志如上,配置nginx的日志分隔为:
    log_format    xxx  '$http_x_forwarded_for - $remote_user [$time_local] "$request"'
                     ' $status $body_bytes_sent "$http_referer"'
                     ' "$http_user_agent" "$remote_addr" "$upstream_response_time" "$request_time"';

各位大侠,能帮忙分析下是什么原因导致的吗?

论坛徽章:
0
2 [报告]
发表于 2011-11-22 10:53 |只看该作者
这个$request_time 与nginx的响应和处理时间有关系
从你截图的来看 nginx的处理的都是小图片文件,处理速度很快所以requset_time较低甚至为0,你可以测试几个大文件,就有结果呢。  呵呵
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP