iFUEL INTERACTIVE

A NY Interactive Agency and a Division of Agency212

See you on Flickr See you on Twitter See you on FaceBook Subscribe
IIS LogParser
September 22nd, 2009  |  NO COMMENTS  |  ASP.Net, Development
Tags: ,

I recently had to analyze how much static data the web server was sending out on a daily basis.  We wanted to try to get a sense of what it would cost to host all this static content on the new Amazon Cloudfront CDN (content delivery network).

I knew there had to be something out there, but I didn’t know there was something right in the IIS 6 resource kit called LogParser.

There are a bunch of options in log parser, but the one I thought was way cool was the ability to basically “query” the log.  For example:

LogParser “Select count(*), sum(sc-bytes) from d:\logs\w3svc1\ex090922.log where cs-uri-stem like ‘%.jpg’ or cs-uri-stem like ‘%.gif’ or cs-uri-stem like ‘%.swf’ or cs-uri-stem like ‘%.css’ or cs-uri-stem like ‘%.js’ or cs-uri-stem like ‘%.pdf’ or cs-uri-stem like ‘%.png’ or cs-uri-stem like ‘%.cur’”
returns:

COUNT(ALL *) SUM(ALL sc-bytes)
———— —————–
23977        53910768

Statistics:
———–
Elements processed: 34195
Elements output:    1
Execution time:     0.22 seconds

This tells me that there were 23K requests for these file types, for a total of about 53Mb.  The log in question only represents 1 hour from one of two servers hosting the site (I think you can process from multiple logs simultaneously – have to spend more time playing around).  And it was really fast – < 1 second!

So kudos to whoever created this tool!

COMMENTS

No one has said anything yet. Be the first?

LEAVE COMMENT
Your name:  (required)

Your email:  (required, will not be published)

Website:  (not required)

Message:  (required)

Categories
Archives
Tags
Meta
Copyright iFuel Interactive © 2010. All Rights Reserved.
Going up? Click here.A NY INTERACTIVE AGENCY