<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>月影鹏鹏 &#187; shell</title>
	<atom:link href="http://jk.aiwaly.com/wp/tag/shell/feed" rel="self" type="application/rss+xml" />
	<link>http://jk.aiwaly.com</link>
	<description>不断探索,追求卓越,做快乐自己</description>
	<lastBuildDate>Thu, 29 Mar 2012 01:09:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>linux脚本对日志分析</title>
		<link>http://jk.aiwaly.com/wp/linux%e8%84%9a%e6%9c%ac%e5%af%b9%e6%97%a5%e5%bf%97%e5%88%86%e6%9e%90.html</link>
		<comments>http://jk.aiwaly.com/wp/linux%e8%84%9a%e6%9c%ac%e5%af%b9%e6%97%a5%e5%bf%97%e5%88%86%e6%9e%90.html#comments</comments>
		<pubDate>Mon, 21 Dec 2009 09:12:14 +0000</pubDate>
		<dc:creator>月影鹏鹏</dc:creator>
				<category><![CDATA[linux 系统]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://jacky.scanmon.com/?p=1453</guid>
		<description><![CDATA[有了日志文件后，我们可以利用UNIX的一些工具和一此专门的日志分析工具对
日志文件进行分析。
实例一：列出访问过本网站的主机名或IP：
对于这个需求，我们可以通过一个Unix的一个脚本语句来完成：
cat /var/log/httpd/access_log &#124; awk &#8216;{print $1}&#8217;
用上面的方法虽然可以得到访问过本网站的主机名或IP，但是由于有些是多次
访问的，我们希望在上面得到的结果的基础上做一些优化，使得列出的表中，
每个主机只出现一次。我们可以使用：
cat /var/log/httpd/access_log &#124; awk &#8216;{print $1}&#8217; &#124; wc -l
3. 当然，我们可以根据需要选择第三方提供日志分析工具甚至自己开发一些日
3. 志分析工具来满足我们的需求。常见的第三方日志分析工具有：WebTrends、
3. Wusage、wwwstat、http-analyze、pwebstats、WebStat Explorer、
3. AccessWatch。
计算独立ip 数实例
[wangpeng@www ~]$  cat /var/log/httpd/access_scanmon.com_log.2006-05-25-00_00_00 &#124; awk  &#8216;{print $1}&#8217; &#124; sort &#124; uniq -c &#124; sort -n &#124; wc -l
91
统计apache  日志中  访问独立ip个数  （排除搜索引擎 本地ip）
#cat access_scanmon.comlog.2006-06-02-00_00_00 &#124; grep -v &#8220;Baiduspider+(+http://www.baidu.com/search/spider.htm)&#8221; &#124; grep -v &#8220;msnbot/1.0 (+http://search.msn.com/msnbot.htm)&#8221; &#124; grep -v [...]]]></description>
		<wfw:commentRss>http://jk.aiwaly.com/wp/linux%e8%84%9a%e6%9c%ac%e5%af%b9%e6%97%a5%e5%bf%97%e5%88%86%e6%9e%90.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

