<?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/"
	>

<channel>
	<title>Tech ++ &#187; Productivity Tools</title>
	<atom:link href="http://www.praveenmodi.com/category/productivity-tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.praveenmodi.com</link>
	<description>Musings on SharePoint, ECM, and more...</description>
	<pubDate>Wed, 16 Jun 2010 20:20:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Parsing IIS logs with Log Parser 2.2</title>
		<link>http://www.praveenmodi.com/parsing-iis-logs-with-logparser-22/</link>
		<comments>http://www.praveenmodi.com/parsing-iis-logs-with-logparser-22/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 01:30:44 +0000</pubDate>
		<dc:creator>Praveen Modi</dc:creator>
		
		<category><![CDATA[Productivity Tools]]></category>

		<category><![CDATA[IIS]]></category>

		<category><![CDATA[Log Parser]]></category>

		<category><![CDATA[Logs]]></category>

		<guid isPermaLink="false">http://www.praveenmodi.com/parsing-iis-logs-with-logparser-22/</guid>
		<description><![CDATA[Last week on Windows Live we had a requirement to verify the number of page views on one specific post. Due to some mismatch in view count on third party tracking and our .net processing mechanism.
As a last resort, we decided to verify the page view count from IIS log.
I took the responsibility of downloading [...]]]></description>
			<content:encoded><![CDATA[<p>Last week on Windows Live we had a requirement to verify the number of page views on one specific post. Due to some mismatch in view count on third party tracking and our .net processing mechanism.</p>
<p>As a last resort, we decided to verify the page view count from IIS log.</p>
<p>I took the responsibility of downloading the IIS logs and parsing them but I had no clue how I am going to do it. After a bit of Googling, I landed on Microsoft IIS.NET website and came to know about &#8220;Log Parser&#8221;.</p>
<p>So in the next few paragraphs I will discuss the usage of Log Parser 2.2 and its various options to parse IIS logs.</p>
<p>As per IIS.NET website &#8220;Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory®.&#8221;</p>
<p>I had 150GB of log files to parse and Log Parser did a great job. So I can confidently say it&#8217;s excellent tool to parse very large IIS log files.</p>
<p>Log Parser command line is really simple.  Here is the syntax:</p>
<pre class="csharpcode">LogParser –i:&lt;inputFileFormat&gt; -o:&lt;<span class="kwrd">output</span> format&gt; &lt;<span class="kwrd">Sql</span> Query&gt; | <span class="kwrd">file</span>:&lt;text <span class="kwrd">file</span>
<span class="kwrd">with</span> <span class="kwrd">SQL</span> Query&gt;
-i:&lt;input_format&gt;   :  one <span class="kwrd">of</span> IISW3C, NCSA, IIS, IISODBC, BIN, IISMSID,
                              HTTPERR, URLSCAN, CSV, TSV, W3C, XML, EVT, ETW,
                              NETMON, REG, ADS, TEXTLINE, TEXTWORD, FS, COM (<span class="kwrd">if</span>
                              omitted, will guess <span class="kwrd">from</span> the <span class="kwrd">FROM</span> clause)
-o:&lt;output_format&gt;  :  one <span class="kwrd">of</span> CSV, TSV, XML, DATAGRID, CHART, SYSLOG,
                              NEUROVIEW, NAT, W3C, IIS, <span class="kwrd">SQL</span>, TPL, <span class="kwrd">NULL</span> (<span class="kwrd">if</span> omitted,
                              will guess <span class="kwrd">from</span> the <span class="kwrd">INTO</span> clause)
&lt;<span class="kwrd">SQL</span> Query&gt; <span class="kwrd">OR</span> <span class="kwrd">file</span>:&lt;text <span class="kwrd">file</span> that <span class="kwrd">contains</span> <span class="kwrd">sql</span> query&gt;</pre>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>So from above, we have: the command, LogParser, an input specification, an output specification and the query or file that contains the query we want to run.</p>
<p>Here are some sample queries which I used on log parser. Let use &#8220;default.aspx&#8221; as a filter to query the logs.</p>
<h4>Get the number of hits to a web page</h4>
<pre class="csharpcode">LogParser -i:IISW3C "<span class="kwrd">SELECT</span> cs-uri-stem, <span class="kwrd">COUNT</span>(*) <span class="kwrd">As</span> Hits
<span class="kwrd">FROM</span> C:\Logs\*.log
<span class="kwrd">WHERE</span> EXTRACT_FILENAME(cs-uri-stem) = <span class="str">'default.aspx'</span> <span class="kwrd">AND</span> sc-status = <span class="str">'200'</span>
<span class="kwrd">GROUP</span> <span class="kwrd">BY</span> cs-uri-stem" -o:DataGrid</pre>
<h4>Get the number of hits to a web page in a 3d bar graph</h4>
<pre class="csharpcode">LogParser -i:IISW3C "<span class="kwrd">SELECT</span> cs-uri-stem, <span class="kwrd">COUNT</span>(*) <span class="kwrd">As</span> Hits
<span class="kwrd">FROM</span> C:\Logs\*.log
<span class="kwrd">WHERE</span> EXTRACT_FILENAME(cs-uri-stem) = <span class="str">'default.aspx'</span> <span class="kwrd">AND</span> sc-status = <span class="str">'200'</span>
<span class="kwrd">GROUP</span> <span class="kwrd">BY</span> cs-uri-stem" -chartType:Bar3D -ChartTitle "Number <span class="kwrd">of</span> hits"
-<span class="kwrd">view</span>:ON</pre>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<h4>Get the number of hits to a web page by IP address</h4>
<pre class="csharpcode">LogParser -i:IISW3C "<span class="kwrd">SELECT</span> c-ip, <span class="kwrd">COUNT</span>(*) <span class="kwrd">As</span> Hits <span class="kwrd">FROM</span> C:\Logs\*.log
<span class="kwrd">WHERE</span> EXTRACT_FILENAME(cs-uri-stem) = <span class="str">'default.aspx'</span> <span class="kwrd">AND</span> sc-status = <span class="str">'200'</span>
<span class="kwrd">GROUP</span> <span class="kwrd">BY</span> c-ip <span class="kwrd">Order</span> <span class="kwrd">by</span> Hits <span class="kwrd">DESC</span>" -o:DataGrid</pre>
<h4>Get the number of hits to a web page by Date</h4>
<pre class="csharpcode">LogParser -i:IISW3C "<span class="kwrd">SELECT</span> <span class="kwrd">date</span>, <span class="kwrd">COUNT</span>(*) <span class="kwrd">As</span> Views <span class="kwrd">FROM</span> C:\Logs\*.log
<span class="kwrd">WHERE</span> cs-uri-stem <span class="kwrd">LIKE</span> <span class="str">'default.aspx'</span> <span class="kwrd">AND</span> sc-status = <span class="str">'200'</span>
<span class="kwrd">GROUP</span> <span class="kwrd">BY</span> <span class="kwrd">date</span>" -o:DataGrid</pre>
<h4>Get the total number of hits to your site</h4>
<pre class="csharpcode">LogParser -i:IISW3C "<span class="kwrd">SELECT</span> cs-uri-stem, <span class="kwrd">COUNT</span>(*) <span class="kwrd">As</span> Hits <span class="kwrd">FROM</span> C:\Logs\*.log  <span class="kwrd">GROUP</span>
<span class="kwrd">BY</span> cs-uri-stem" -q:<span class="kwrd">ON</span> –o:DataGrid</pre>
<h4>Get the average time taken to load the web pages</h4>
<pre class="csharpcode">LogParser -i:IISW3C "<span class="kwrd">SELECT</span> cs-uri-stem, <span class="kwrd">AVG</span>(<span class="kwrd">time</span>-taken) <span class="kwrd">As</span> AvgTime <span class="kwrd">FROM</span>
C:\Logs\*.log <span class="kwrd">GROUP</span> <span class="kwrd">BY</span> cs-uri-stem" -q:<span class="kwrd">ON</span> -0:DataGrid</pre>
<h4>Get the info about the type of content takes most of the bandwidth on the IIS web server</h4>
<pre class="csharpcode">LogParser -i:IISW3C "<span class="kwrd">SELECT</span> EXTRACT_EXTENSION(cs-uri-stem) <span class="kwrd">AS</span> PageType,
<span class="kwrd">SUM</span>(sc-bytes) <span class="kwrd">AS</span> Bytes <span class="kwrd">INTO</span> TrafficDistribution.GIF <span class="kwrd">FROM</span> C:\Logs\*.log
<span class="kwrd">GROUP</span> <span class="kwrd">BY</span> PageType <span class="kwrd">ORDER</span> <span class="kwrd">BY</span> Bytes <span class="kwrd">DESC</span>" -chartType:PieExploded3d -<span class="kwrd">view</span>:ON</pre>
<h4>Get the requests between time frames</h4>
<pre class="csharpcode">LogParser -i:IISW3C "<span class="kwrd">SELECT</span> <span class="kwrd">date</span>, <span class="kwrd">time</span>, cs-uri-stem, cs-uri-query, cs-username,
c-ip, sc-status, sc-substatus, sc-win32-status, <span class="kwrd">time</span>-taken <span class="kwrd">FROM</span> C:\Logs\*.log
<span class="kwrd">WHERE</span>  TO_TIME(<span class="kwrd">time</span>) <span class="kwrd">BETWEEN</span> <span class="kwrd">TIMESTAMP</span>(<span class="str">'00:00:02'</span>,<span class="str">'hh:mm:ss'</span>)
<span class="kwrd">AND</span> <span class="kwrd">TIMESTAMP</span>(<span class="str">'00:00:08'</span>,<span class="str">'hh:mm:ss'</span>)" -o:DataGrid</pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --> <!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>Remember that IIS Logs time are in GMT by default.</p>
<h3>Useful information about Log Parser</h3>
<p><strong><a href="http://forums.iis.net/default.aspx?GroupID=51" target="_blank" class="external" rel="nofollow"><span style="text-decoration: underline;">Official Log Parser Forum on IIS.NET</span></a></strong></p>
<p><strong><a href="http://www.iis.net/Downloads/files/LogParser/LogParser-ENU.chm" target="_blank" class="external" rel="nofollow"><span style="text-decoration: underline;">Download link to Log Parser Documentation</span></a></strong></p>
<p><strong><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&amp;displaylang=en" target="_blank" class="external" rel="nofollow"><span style="text-decoration: underline;">Log Parser download link</span></a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.praveenmodi.com/parsing-iis-logs-with-logparser-22/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zamzar - Free Online file conversion</title>
		<link>http://www.praveenmodi.com/zamzar-free-online-file-conversion/</link>
		<comments>http://www.praveenmodi.com/zamzar-free-online-file-conversion/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 15:24:20 +0000</pubDate>
		<dc:creator>Praveen Modi</dc:creator>
		
		<category><![CDATA[Productivity Tools]]></category>

		<category><![CDATA[File conversion]]></category>

		<guid isPermaLink="false">http://www.praveenmodi.com/?p=24</guid>
		<description><![CDATA[
Are you looking for a tool to your files from one format to another? ZamZar,  offers FREE online file conversion and allows users to upload and convert the files upto 100 Mbs. It can convert documents, videos, sounds and images formats to various different formats and for free. It covert all the common required file [...]]]></description>
			<content:encoded><![CDATA[<p><a class="alignleft external" title="Go to Zamzar" href="http://www.zamzar.com" target="_blank" rel="nofollow"><img class="size-full wp-image-25 alignleft" title="zamzar-logo" src="http://www.praveenmodi.com/wp-content/uploads/2008/09/zamzar-logo.jpg" alt="" width="194" height="57" /></a></p>
<p>Are you looking for a tool to your files from one format to another? ZamZar,  offers FREE online file conversion and allows users to upload and convert the files upto 100 Mbs. It can convert documents, videos, sounds and images formats to various different formats and for free. It covert all the common required file conversions like WAV to MP3, JPEG to TIFF, DOC to HTML, and AVI to MP4.</p>
<p>The files are kept on the servers of Zamzar for 24 hrs. and it sends you the link of the file for download on your specified email address. It is safe to submit your email address as well.ZamZar can convert between 8 image formats, 16 document formats, 9 audio formats, 13 video formats, and 9 compressed formats. Check the <a title="File format Conversion List" href="http://www.zamzar.com/conversionTypes.php" target="_blank" class="external" rel="nofollow">complete list here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.praveenmodi.com/zamzar-free-online-file-conversion/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
