request-log-analyzer log分析工具

参考网址:
[url]http://github.com/wvanbergen/request-log-analyzer[/url]
[url]http://www.letrails.cn/archives/rails-performance-optimization-guide/[/url]
[url]http://wiki.github.com/wvanbergen/request-log-analyzer/basic-usage[/url]


Getting started

Use RubyGems to install request-log-analyzer on your computer:

$ gem install request-log-analyzer


Now you can run request-log-analyzer to analyze a log file:

$ request-log-analyzer log/production.log


Basic usage

If you want to analyze a Rails production log file, use the following syntax:

$ request-log-analyzer production.log


This will generate a report, similar to our Sample output. If you want analyze multiple files (because of logrotate or multiple mongrel log files), you can provide multiple filenames or use wildcards. The files will be process in the order that they are given on the command line.

$ request-log-analyzer mongrel.2008-11.log mongrel.2008-12.log mongrel.2009-01.log 

$ request-log-analyzer production.*.log


Parsing from the standard input

Request-log-analyzer can also parse the standard input by using - or STDIN as filename. This is great in combination with the UNIX tail -f command to parse information live, as it is written to the log file.

$ tail -f production.log | request-log-analyzer -


Request-log-analyzer will then parse any information that is written to the log file until it is stopped by pressing CTRL+C, after which it will present the performance report for all data that has been collected up to that point.


Examples

Write an HTML report to report.html:
$ request-log-analyzer log/production.log --file report.html --output HTML

Only use uncolored ASCII characters in the report:
$ request-log-analyzer log/production.log --boring

Create a database named requests.db with all parsed request information
$ request-log-analyzer log/production.log --database requests.db
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值