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. Python面向对象之结构与成员

    1.面向对象结构分析: ----面相对象整体大致分为两块区域: --------第一部分:静态字段(静态变量)部分 --------第二部分:方法部分 --每个大区域可以分为多个小部分: class ...

  2. MySQL创建用户+授权+备份

    ======权限管理====== 我们知道我们的最高权限管理者是root用户,它拥有着最高的权限操作.包括select.update.delete.update.grant等操作. 那么一般情况在公司 ...

  3. 基于vuecli3构建一个快速开发h5 APP的模板

    基于vuecli3构建的一个快速开发h5 APP的模板,集成了高德地图.mint-ui,以及antv-f2可视化框架 vue-cli3安装 查看vue cli版本 vue --version 要求no ...

  4. 重置 linux系统后要配置的基本组件操作

    1.安装jdk https://www.cnblogs.com/shihaiming/p/5809553.html 2.安装mysql 3.安装tomcat

  5. 《javascript设计模式》笔记之第十章 和 第十一章:门面模式和适配器模式

    第十章:门面模式 一:门面模式的作用 简化已有的api,使其更加容易使用 解决浏览器的兼容问题 二:门面模式的本质 门面模式的本质就是包装已有的api来简化操作   三:门面模式的两个简单例子 下面这 ...

  6. c#进行MD5加密方式和解密算法

    --------------- 因为加密个解密都需要用到key所有在加密的后需要把key和加密码都存到数据库中 /// <summary> /// 唯一加密方式 /// </summ ...

  7. Java基础:(一)数据类型

    一.包装类型 基本类型都有对应的包装类型,基本类型与其对应的包装类型之间的赋值使用自动装箱与拆箱完成. 八个基本类型:boolean/1:byte/8:char/16:short/16:int/32: ...

  8. go语言简单的soap调用方法

    package main import ( "bytes" "encoding/xml" "fmt" "io" &quo ...

  9. SharePoint 2013 安装配置(3-2)

    第三部分SQL Server后端配置篇幅较长,上一篇介绍SQL Server 前提条件及安装(3-1),这篇分享SQL Server功能安装配置,请参考以下步骤. 10.在“安装角色”屏幕上,选择“S ...

  10. C#注册表操作类(完整版)

    下面贴出自己用C#写的注册表操作类,欢迎大家拍砖! 1.注册表基项静态域 1 /// <summary> 2 /// 注册表基项静态域 3 /// 4 /// 主要包括: 5 /// 1. ...