<?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>深蓝的blog &#187; log</title>
	<atom:link href="http://www.lanxinbase.com/?feed=rss2&#038;tag=log" rel="self" type="application/rss+xml" />
	<link>http://www.lanxinbase.com</link>
	<description>记录日常生活</description>
	<lastBuildDate>Sat, 18 Apr 2026 07:10:07 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.2.3</generator>
	<item>
		<title>日志提取分析工具（java源码）</title>
		<link>http://www.lanxinbase.com/?p=1877</link>
		<comments>http://www.lanxinbase.com/?p=1877#comments</comments>
		<pubDate>Thu, 07 Jun 2018 04:57:22 +0000</pubDate>
		<dc:creator><![CDATA[Alan]]></dc:creator>
				<category><![CDATA[1.服务端语言]]></category>
		<category><![CDATA[2.运维相关]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[log]]></category>

		<guid isPermaLink="false">http://www.lanxinbase.com/?p=1877</guid>
		<description><![CDATA[最近有个项目，是硬件结合的，硬件上传到服务器的日志，每天数百万条，有时候某个设备出问题了，因为日志的数据很混乱，很难查出具体的原因。

所以写了这个工具，主要是提高日志分析的效率，可以通过关键词提取日志数据。

工具使用了多线程、I/O等技术，本人技术有限，所以只能写到这样子，测试过很多次。

测试出来的数据：400MB的日志，5个线程：96~97秒完成分割，分割出来的日志大小大同小异，为什么不把分割出来的日志合并呢？因为线程的启动时间不是顺序的，加上本人懒，所以没做了。

不建议使用超过20个线程去处理日志。因为如果是2GB的数据，10个线程去处理，每个线程也只需要处理204.8MB。这个已经是非常快的效率了。]]></description>
		<wfw:commentRss>http://www.lanxinbase.com/?feed=rss2&#038;p=1877</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
