另有更易使用的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.
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
分享到:
相关推荐
Maven坐标:org.apache.logging.log4j:log4j-jul:2.12.1; 标签:apache、logging、log4j、jul、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...
Maven坐标:org.apache.logging.log4j:log4j-api:2.7; 标签:apache、logging、api、log4j、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化...
Apache Http Server : Apache/2.0.63 Apache Tomcat : Apache Tomcat/5.5.27 mod_jk : jk2.0.4-win32
Maven坐标:org.apache.logging.log4j:log4j-core:2.17.1; 标签:apache、logging、log4j、core、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 ...
Maven坐标:org.apache.logging.log4j:log4j-core:2.7; 标签:core、apache、logging、log4j、jar包、java、中文文档; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性...
apache web服务器的配置手册,方便搭建网站使用apache web服务器的人参考
Apache Flume, Distributed Log Collection for Hadoop,2015 第二版,Packt Publishing
从零开始介绍Apache FtpServer,并一步一步教你配置Apache FtpServer,更高级的应用,教你用写代码控制Apache FtpServer及集成到自己的应用中 <!--ftp端口 --> <!--绑定的服务器IP地址,多网卡的时候使用...
Windows下仿造Apache Web Server,采用IOCP完成端口架构,能够处理html请求,解析php语言。 IOCP已用类封装好,可代码复用。
Apache Web Server2.0.40.tar(Linux下使用),不多说了,需要的就下载,反正不要积分……
赠送jar包:apache-log4j-extras-1.2.17.jar; 赠送原API文档:apache-log4j-extras-1.2.17-javadoc.jar; 赠送Maven依赖信息文件:apache-log4j-extras-1.2.17.pom; 包含翻译后的API文档:apache-log4j-extras-...
最流行的Web服务器软件。快速、可靠、可通过简单的 API 扩展,Perl/Python 解释器可被编译到服务器中,完全免费,...如果你需要创建一个每天有数百万人访问的 Web 服务器,Apache 可能是最佳选择。解压密码www.faji.com
最流行的Web服务器软件。Linux + Apache是目前免费服务器中的最佳拍挡。Apache快速、可靠、可通过简单的API扩展,Perl/Python解释器可被...如果你需要创建一个每天有数百万人访问的Web服务器,Apache可能是最佳选择。
Apache Ftpserver 全套,包括源码, jar包 及配置说明,需要的就下载吧
Ansible-Docker-Apache DOCKER中的APACHE WEBSERVER配置 :whale: 使用ANSI
Apache Server 1.3.11 in source code and Windows binary format Apache Server 1.3.9 in source code and Windows binary format CGIWrap 3.6.4 in source code format Comanche 2.0 for UNIX and Windows ...
Windows 7中将Django部署到Apache Web Server.docx
Chapter 3: Running Your First Apache Thrift Service and Client Chapter 4: Understanding How Apache Thrift Works Chapter 5: Generating and Running Code in Different Languages Chapter 6: Handling Errors...
bimserver安装时报dependency org.apache.httpcomponents:httpclient is not installed,把jar包放到项目的maven下,
最流行的Web服务器软件。快速、可靠、可通过简单的 API 扩展,Perl/Python 解释器可被编译到服务器中,完全免费,完全源代码开放。如果你需要创建一个每天有数百万人访问的 Web 服务器,Apache 可能是最佳选择。