nginx配置:

 http {
#...其他配置
log_format tpynormal '$remote_addr | [$time_local] | $host | "$request" | '
'$status | $body_bytes_sent | "$http_referer" | '
'"$http_user_agent" | "$http_x_forwarded_for" | '
'$upstream_addr | $upstream_status | $upstream_response_time | '
'$server_addr |$http_cookie|$request_time| ';
server {
#...其他配置
access_log /datas/log/www/access.abc_tp.log tpynormal;
}
}

脚本下载:http://pan.baidu.com/s/1bGAXEQ

使用及结果:

 [root@localhost ~]# cat /datas/log/www/access.abc_tp.log | ./xlog
No filter
Log count total: , filtered: , rate: 0.000000
Body bytes total: , filtered: , rate: 0.000000
Time seconds total: 17.71900, filtered: 0.00000, rate: 0.000000
Time average total: 0.07174, filtered: NaN
Time dist total: filtered:
<0.05 , 45.749%
0.05-0.1 , 41.700%
0.1-0.2 , 10.526%
0.5- , 1.215%
0.3-0.5 , 0.810%
Status code total: filtered:
, 100.000%
Http method total: filtered:
GET , 97.571%
POST , 2.429%
RealIP total: filtered:
127.0.0.1 , 98.381%
192.168.128.2 , 1.619%
Uri total:
16.194%, /?service=Stationmessage.StationNotice.getNewStationNoticeCenter&userId=&isCount=
8.097%, /?service=standard.options.getConfig&siteOptions=download_app
7.692%, /?service=user.users.getInfoById&userId=
4.453%, /?service=Live.anchor.followAnchorList&userId=&page=&limit=
4.453%, /?service=Live.Live.getNewHotList&userId=&page=&limit=&deviceNo=
4.453%, /?service=user.users.getUserInfoNumber&userId=
4.453%, /?service=Live.live.getNewFollowList&userId=&page=&limit=
4.049%, /?service=Live.Live.getNewFollowList&userId=&page=&limit=
3.239%, /?service=video.video.shareVideo&id=
2.834%, /?service=Stationmessage.StationNotice.getNewStationNoticeCenter&userId=&isCount=
2.429%, /?service=Live.Live.getNewHotList&userId=&page=&limit=&deviceNo=
2.429%, /?service=Live.video.getVideoLists&page=&type=hot
2.429%, /?service=video.video.getVideoLists&uid=&page=
2.024%, /?service=Live.Live.getNewFollowList&userId=&page=&limit=
2.024%, /?service=Live.Live.getNewFollowList&userId=&page=&limit=
2.024%, /?service=Live.anchor.followAnchorList&userId=&page=&limit=
2.024%, /?service=Live.live.getNewFollowList&userId=&page=&limit=
1.619%, /?service=Shop.index.getIndexInfo
1.619%, /?service=Live.live.getNewFollowList&page=&limit=
1.619%, /?service=user.users.passLogin
1.215%, /?service=standard.verify.verifyMobileIsReg&mobile=
1.215%, /?service=video.video.getVideoLists&uid=&page=&type=
-- of is hidden
Uri filtered:
Uri pattern total:
19.028%, /?service=Stationmessage.StationNotice.getNewStationNoticeCenter&userId=[-]&isCount=[-]
12.146%, /?service=Live.Live.getNewFollowList&userId=[-]&page=[-]&limit=[-]
8.097%, /?service=standard.options.getConfig&siteOptions=download_app
8.097%, /?service=Live.Live.getNewHotList&userId=[-]&page=[-]&limit=[-]&deviceNo=
8.097%, /?service=user.users.getInfoById&userId=[-]
6.478%, /?service=Live.live.getNewFollowList&userId=[-]&page=[-]&limit=[-]
6.478%, /?service=Live.anchor.followAnchorList&userId=[-]&page=[-]&limit=[-]
4.858%, /?service=user.users.getUserInfoNumber&userId=[-]
4.049%, /?service=video.video.getVideoLists&uid=[-]&page=[-]
3.644%, /?service=video.video.getVideoLists&uid=[-]&page=[-]&type=[-]
3.239%, /?service=video.video.shareVideo&id=[-]
2.429%, /?service=Live.video.getVideoLists&page=[-]&type=hot
2.024%, /?service=live.Anchor.starRankList&userId=[-]&page=[-]&type=[-]
1.619%, /?service=Live.live.getNewFollowList&page=[-]&limit=[-]
1.619%, /?service=user.users.passLogin
1.619%, /?service=standard.verify.verifyMobileIsReg&mobile=[-]
1.619%, /?service=user.users.accountLog&userId=[-]&page=[-]&limit=[-]
1.619%, /?service=Shop.index.getIndexInfo
0.810%, /?service=user.users.updateInfo
0.810%, /?service=user.users.newPersonalDetails&userId=[-]&selectId=[-]
0.810%, /?service=Live.Live.getLiveList&cateId=[-]&userId=[-]&page=[-]&limit=[-]
0.405%, /?service=video.video.getVideoLists&page=[-]
-- of is hidden
Uri pattern filtered:

更多用法参考:

[root@localhost ~]# ./xlog -h

小试nginx日志分析xlog的更多相关文章

  1. ELK+redis搭建nginx日志分析平台

    ELK+redis搭建nginx日志分析平台发表于 2015-08-19   |   分类于 Linux/Unix   |  ELK简介ELKStack即Elasticsearch + Logstas ...

  2. nginx日志分析利器GoAccess

    面试的时候一定会被面到的问题是:给出web服务器的访问日志,请写一个脚本来统计访问前10的IP有哪些?访问前10的请求有哪些?当你领略过goaccess之后,你就明白,这些问题,除了考验你的脚本背诵记 ...

  3. 使用elk+redis搭建nginx日志分析平台

    elk+redis 搭建nginx日志分析平台 logstash,elasticsearch,kibana 怎么进行nginx的日志分析呢?首先,架构方面,nginx是有日志文件的,它的每个请求的状态 ...

  4. Nginx日志分析及脚本编写

    在我们日常的运维中,当Nginx服务器正常运行后,我们会经常密切关注Nginx访问日志的相关情况,发现有异常的日志信息需要进行及时处理. 那今天我将跟大家一起来研究和分析Nginx日志,nginx默认 ...

  5. nginx日志分析利器GoAccess(转)

    面试的时候一定会被面到的问题是:给出web服务器的访问日志,请写一个脚本来统计访问前10的IP有哪些?访问前10的请求有哪些?当你领略过goaccess之后,你就明白,这些问题,除了考验你的脚本背诵记 ...

  6. nginx高性能WEB服务器系列之八--nginx日志分析与切割

    nginx系列友情链接:nginx高性能WEB服务器系列之一简介及安装https://www.cnblogs.com/maxtgood/p/9597596.htmlnginx高性能WEB服务器系列之二 ...

  7. Nginx 日志分析及性能排查

    Nginx 日志分析及性能排查 2017-03-04 Linux爱好者 (点击上方公众号,可快速关注) 作者:-外星人- my.oschina.net/362228416/blog/844713 如有 ...

  8. (转)10 分钟内快速构建能够承载海量数据的 nginx 日志分析与报警平台

    10 分钟内快速构建能够承载海量数据的 nginx 日志分析与报警平台 原文:https://blog.qiniu.com/archives/8713

  9. 【分享】Nginx日志分析(上)

    在很多时候,我们会非常关注网站的访问量,比如网站的日PV是多少.网站某个功能上线之后点击量是多少,像这些东西都是需要从web容器中的访问日志统计出来的,下面我们看一下如何在nginx中统计网站的访问信 ...

随机推荐

  1. Linux操作学习笔记1

    Linux只有一个根目录/,所有的文件和设备都当成是文件进行管理: pwd 打印当前工作目录 (print working directory) whoami ls  列出当前目录面的文件 ls -l ...

  2. @Slf4j注解的使用

    项目中使用Slf4j日志: private static final Logger log=LoggerFactory.getLogger(TestMain.class); 使用@Slf4j以后,默认 ...

  3. 076 Minimum Window Substring 最小窗口子字符串

    给定一个字符串 S 和一个字符串 T,找到 S 中的最小窗口,它将包含复杂度为 O(n) 的 T 中的所有字符.示例:S = "ADOBECODEBANC"T = "AB ...

  4. wpf ComboBox的SelectionBoxItem相关依赖属性

    以前没有注意SelectionBoxItem相关依赖属性,这几天看wpf源码 特意研究了一番 <Style x:Key="ComboBoxStyle1" TargetType ...

  5. Java基础:(四)继承

    一.访问权限 java中有三个访问权限修饰符private:protected:public和一个默认default(不加修饰符). 如果子类的方法覆盖了父类的方法,那么子类中该方法的访问级别不允许低 ...

  6. sql 容易被忽视的点

    1 dual select查询语句只有select就可以,但为了规范,凑结构,可以加个dual 例:select now() from dual; 这个概念是Oracle中的.在mysql中可写可不写 ...

  7. 用Node+wechaty写一个爬虫脚本每天定时给女(男)朋友发微信暖心话

    wechatBot 微信每日说,每日自动发送微信消息给你心爱的人 项目介绍 灵感来源 在掘金看到了一篇<用Node + EJS写一个爬虫脚本每天定时女朋友发一封暖心邮件>后, 在评论区偶然 ...

  8. layui内置loading等待加载

    点击功能按钮之后 var loading = layer.load(0, { shade: false, time: 2*1000 }); 参数: icon:0,1,2 loading风格 shade ...

  9. django之session配置

    session应用示例 from django.shortcuts import render from django.shortcuts import HttpResponse from djang ...

  10. HDU 1007 Quoit Design最近点对( 分治法)

    题意: 给出平面上的n个点,问任意点对之间的最短距离是多少? 思路: 先将所有点按照x坐标排序,用二分法将n个点一分为二个部分,递归下去直到剩下两或一个点.对于一个部分,左右部分的答案分别都知道,那么 ...