小试nginx日志分析xlog
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的更多相关文章
- ELK+redis搭建nginx日志分析平台
ELK+redis搭建nginx日志分析平台发表于 2015-08-19 | 分类于 Linux/Unix | ELK简介ELKStack即Elasticsearch + Logstas ...
- nginx日志分析利器GoAccess
面试的时候一定会被面到的问题是:给出web服务器的访问日志,请写一个脚本来统计访问前10的IP有哪些?访问前10的请求有哪些?当你领略过goaccess之后,你就明白,这些问题,除了考验你的脚本背诵记 ...
- 使用elk+redis搭建nginx日志分析平台
elk+redis 搭建nginx日志分析平台 logstash,elasticsearch,kibana 怎么进行nginx的日志分析呢?首先,架构方面,nginx是有日志文件的,它的每个请求的状态 ...
- Nginx日志分析及脚本编写
在我们日常的运维中,当Nginx服务器正常运行后,我们会经常密切关注Nginx访问日志的相关情况,发现有异常的日志信息需要进行及时处理. 那今天我将跟大家一起来研究和分析Nginx日志,nginx默认 ...
- nginx日志分析利器GoAccess(转)
面试的时候一定会被面到的问题是:给出web服务器的访问日志,请写一个脚本来统计访问前10的IP有哪些?访问前10的请求有哪些?当你领略过goaccess之后,你就明白,这些问题,除了考验你的脚本背诵记 ...
- nginx高性能WEB服务器系列之八--nginx日志分析与切割
nginx系列友情链接:nginx高性能WEB服务器系列之一简介及安装https://www.cnblogs.com/maxtgood/p/9597596.htmlnginx高性能WEB服务器系列之二 ...
- Nginx 日志分析及性能排查
Nginx 日志分析及性能排查 2017-03-04 Linux爱好者 (点击上方公众号,可快速关注) 作者:-外星人- my.oschina.net/362228416/blog/844713 如有 ...
- (转)10 分钟内快速构建能够承载海量数据的 nginx 日志分析与报警平台
10 分钟内快速构建能够承载海量数据的 nginx 日志分析与报警平台 原文:https://blog.qiniu.com/archives/8713
- 【分享】Nginx日志分析(上)
在很多时候,我们会非常关注网站的访问量,比如网站的日PV是多少.网站某个功能上线之后点击量是多少,像这些东西都是需要从web容器中的访问日志统计出来的,下面我们看一下如何在nginx中统计网站的访问信 ...
随机推荐
- Codeforces Round 56-A. Dice Rolling(思维题)
time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...
- Mac OS X
Mac OS X 除了微软自家的Windows平台, .NET Core针对Mac OS以及各种Linux(RHEL.Ubuntu.Debian.Fedora.CentOS和SUSE等)都提供了很好的 ...
- Ubuntu上k8s集群里创建证书
证书: k8s里创建证书(使用证书文件命令创建): kubectl create secret tls scdsc-org-cn --cert=/etc/letsencrypt/live/scdsc. ...
- HDU 1024 A - Max Sum Plus Plus DP + 滚动数组
http://acm.hdu.edu.cn/showproblem.php?pid=1024 刚开始的时候没看懂题目,以为一定要把那n个数字分成m对,然后求m对中和值最大的那对 但是不是,题目说的只是 ...
- js得到当前页面的url信息
所有的代码都是可用,而且附了图片的,不过是直接用我自己的文章地址,所以有些显示的有点奇怪. 大家可以找个网址试试代码是否可行. 1,设置或获取对象指定的文件名或路径. console.log(wind ...
- fleet-运行一个全局的单元
运行一个全局的单元 正如前面所提到的,全局单元是有用的,用于在您的集群中的所有机器上运行一个单元.它不会比一个普通的单元差太多,而是一个新的x-fleet参数称为Global=true.这是一个示例单 ...
- AJPFX浅析Java数组
数组(array)是相同类型变量的集合,可以使用共同的名字引用它.数组可被定义为任何类型,可以是一维或多维.数组中的一个特别要素是通过下标来访问它.数组提供了一种将有联系的信息分组的便利方法.注意:如 ...
- MATLAB 添加自定义的模块到simulink库浏览器
在simulink 浏览器窗口File->new->library,打开编辑窗口,将自定义的模块托人编辑窗口.保存为DC_MOTOR_sub_lib.mdl文件. 新建function文件 ...
- Windows环境中,通过Charles工具,抓取安卓手机、苹果手机中APP应用的http、https请求包信息
Windows环境中,通过Charles工具,抓取安卓手机.苹果手机中APP应用的http.https请求包信息1.抓取安卓手机中APP应用的http请求包信息1)在电脑上操作,查看Windows机器 ...
- nodeis 避免回调引起的栈溢出 Maximum call stack size exceeded
//如果这样写,会发生栈溢出 var i = 1; function isEven() { console.log(i++); // return isEven(); retu ...