小试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中统计网站的访问信 ...
随机推荐
- Django-Rest-Framework的视图和路由
Django-Rest-Framework的视图和路由 restful framework Django-Rest-Framework的视图 APIView django中写CBV的时候继承的是V ...
- mysql 启动停止脚本 and mysql 迁移 导入和导出
####监控脚本 [root@pdb~]# more /opt/VRTS/scripts/mysql_monitor.sh#!/bin/shn=`ps -ef |grep mysql|grep &qu ...
- 网络编程之异步IO,rabbitMQ笔记
对于网络并发编程而言,多线程与多进程算是最常见的需求场景了.毕竟网站开放就是想要更多的流量访问的. 回顾 回顾下之前学过的关于线程,进程和协程的知识点 IO密集型任务--用多线程更好计算密集型任务-- ...
- java内存分配(堆、栈、常量池)
Java内存分配: ◆寄存器:我们在程序中无法控制 ◆栈:存放基本类型的数据和对象的引用,以及成员方法中的局部变量 ◆堆:存放对象本身(成员变量+成员方法的引用) ◆静态域:存放在对象中用static ...
- 提升Java代码质量(一)
博主双12入手了一本"Effective Java第二版",本系列文章将初步梳理书中内容,我也查了些资料,我会针对知识点做一点展开,方便以后复习回顾; Item1.考虑用静态工厂代 ...
- webAPP制作框架Ionic--构建APP侧边栏 底部选项卡 轮播图 加载动画
超好用的移动框架--Ionic Ionic是一个轻量的手机UI库,具有速度快,界面现代化.美观等特点. 为了解决其他一些UI库在手机上运行缓慢的问题,它直接放弃了IOS6和Android4.1以下的版 ...
- 文件系统结构-《循序渐进linux》
1.目录结构 很多linux的发行版都遵循FSSTND标准,这一标准仅包含系统最基本的文件. /dev 设备文件 /bin 可执行的二进制文件 /opt /root 超级用户的主目录 /home 每个 ...
- Date-DateFormat-Calendar-Math-regex
一.Date类(java.util) 作用:表示时间的类,精确到毫秒,以GMT 1970年1月1日0点0分0秒起算 构造方法: Data() ---获取当前时间 Date(long ...
- VMware与Hyper-V不兼容
一.问题描述 VMware Workstation与Hyper-V不兼容. 二.解决方案 取消Hyper-V功能,即将Hyper-V框中钩去掉. 三.总结思考 开始不清楚怎么解决这个问题,主要原因在于 ...
- POJ 1067 取石子游戏 (威佐夫博奕,公式)
题意: 有两堆石子,两个人轮流取石子.规定每次有两种取法,一是可以在任意的一堆中取走任意多的石子:二是可以在两堆中同时取走相同数量的石子.最后把石子全部取完者为胜者.给定两堆石子数量,问先手的输赢? ...