平时整理的一些常识,希望对大家有所帮助
2010-10-27 23:38
483 查看
另有更易使用的apachetop和goaccess
wtop is really cool application for web server log analysis and to see server stats at a glance. It also has powerful log grepping capability. It is just like 'top' for your webserver.
It can find out number of searches or signups per seconds. It can also create histogram of response time. There is also another tool called logrep a powerful command-line program for ad-hoc analysis and filtering for log files. You can dig up lots of information using wtop tools.
You need Python version 2.5 to run wtop.
Sample configuration file:
Now simply type wtop at a shell prompt:
See all human traffic, enter:
See response times for all MSNBot homepage hits:
Display the current log for traffic to pages about wordpress or themes sent from google.com
wtop is really cool application for web server log analysis and to see server stats at a glance. It also has powerful log grepping capability. It is just like 'top' for your webserver.
It can find out number of searches or signups per seconds. It can also create histogram of response time. There is also another tool called logrep a powerful command-line program for ad-hoc analysis and filtering for log files. You can dig up lots of information using wtop tools.
You need Python version 2.5 to run wtop.
Download wtop
Type the following command:$ cd /tmp $ wget http://wtop.googlecode.com/files/wtop-0.5.6.tar.gz $ tar -zxvf wtop-0.5.6.tar.gz $ cd wtop-0.5.6 # python setup.py install
Configuring wtop
Once installed you can start using the tool immediately. You need to edit /etc/wtop.cfg file to setup parameters, Apache log files and other directives# vi /etc/wtop.cfg
Sample configuration file:
[main] LOG_ROOT=/var/log/lighttpd/cyberciti.biz/ LOG_FILE=access.log DEFAULT_OUTPUT_FIELDS=ts,class,ipcnt,ip,msec,uas,url # This must match your webserver log format. You MUST have at least %h, %r and %D LOG_FORMAT=%h %l %u %t "%r" %>s %B "%{Referer}i" "%{User-Agent}i" %D [wtop] # max time before a request is logged in the "slow" column MAX_REQUEST_TIME=5000 # minimum requests/second before a URL class appears in top mode MIN_RPS=0.2 [classes] # you can extend these to make any classes you wish home=^/(?:\?.*)?$ xml=\.xml(?:\?.*)?$ js=\.js(?:\?.*)?$ css=\.css(?:\?.*)?$ img=\.(?:png|gif|jpe?g|cur|ico|bmp)(?:\?.*)?$ [patterns] # the generic pattern is applied if a line does not match any # of the named classes. By default it uses the top-level directory. generic=^/([^/\?]+) # incomplete list of known web robots robots = r'(?:nutch|MSRBOT|translate.google.com|Feedster|Nutch|Gaisbot|Snapbot|VisBot|libwww|CazoodleBot|polybot|VadixBot|Sogou|SBider|BecomeBot|Yandex|Pagebull|chudo|Pockey|nicebot|entireweb|FeedwhipBOT|ConveraCrawler|NG/2.0|WebImages|Factbot|information-online|gsa-crawler|Jyxobot|SentinelCrawler|BlogPulseLive|YahooFeedSeeker|GurujiBot|wwwster|Y\!J-SRD|Findexa|SurveyBot|yetibot|discoveryengine|fastsearch|noxtrum|Googlebot|Snapbot|OGSearchSpider|heritrix|nutch-agent|Slurp|msnbot|cuill|Mediapartners|YahooSeeker|GrabPERF|keywen|ia_archiver|crawler.archive.org|Baiduspider|larbin|shopwiki)'
Now simply type wtop at a shell prompt:
$ wtop$
See all human traffic, enter:
$ logrep -m top -h access.log
See response times for all MSNBot homepage hits:
$ logrep -m grep -g MSNBot -i home -o status,msec,url access.log
Display the current log for traffic to pages about wordpress or themes sent from google.com
$ logrep -m tail --f 'url~wordpress|themes,ref~google.com' access.log
相关文章推荐
- 日常整理的一些网址,希望对大家有所帮助
- 一些总结与思考(聊聊最近,希望对大家有所帮助)
- 关于权限管理设计文章整理,希望对大家有所帮助
- 关于权限管理设计文章整理,希望对大家有所帮助
- 工作之余,整理了一下平时处理数据的一些常用的,简单的方法。希望对学习JAVA的朋友有点帮助
- 免费资料大放送大家好!我整理了一些免费it视频教程及电子书的资料,还不错,对开发入门或者是想提升技术高度的童鞋可能会比较有用,分享给大家,希望可以帮助到大家
- 关系数据库的查询优化策略----总结了一些查询优化的方法,希望可以对大家有所帮助(原创)
- 关系数据库的查询优化策略----总结了一些查询优化的方法,希望可以对大家有所帮助
- 通过博客惊醒整理的文章,希望对大家有所帮助!
- .NET 新手小组 / 最近整理了一份C# WinForm开发系列,希望对大家有所帮助
- JSP乱码笔记整理-希望对大家有所帮助
- 关于权限管理设计文章整理,希望对大家有所帮助
- 多年积累的一些工具希望对大家有所帮助
- 准备近期写一些关于RESIP开发有关的VOIP资料,希望对大家有所帮助
- 一些常用的MSSQL的SQL语句供大家参考,希望对大家有所帮助
- Eclipse当中常用的一些快捷键,希望会帮助大家,在平时的编程的过程当中更加的便利~
- 整理一些关于IOS内存管理的东西,希望对大家有帮助
- 今天给大家分享一个购物车的例子,希望对大家有所帮助
- java 超强日期处理 东西很多 希望能对大家有所帮助
- 关于exe形式编程的一点心得,希望对大家有所帮助