LOGPARSER #22: Domains referring traffic to your site

SELECT    EXTRACT_TOKEN(cs(Referer), 2, ‘/’) AS Domain,   COUNT(*) AS [Requests] INTO    ReferringDomains.txt FROM     logs\iis\ex*.log GROUP BY    Domain ORDER BY    Requests DESC //Anders


LOGPARSER #21: Get bytes per extension

This script will give you the amount of bytes sent by each file type, for example pictures, ASPX pages etc. Great if you need to work with size/performance. SELECT        EXTRACT_EXTENSION( cs-uri-stem ) AS Extension,     MUL(PROPSUM(sc-bytes),100.0) AS PercentageOfBytes,     Div(Sum(sc-bytes),1024) as AmountOfMbBytes INTO     BytesPerExtension.txt FROM     logs\iis\ex*.log GROUP BY     Extension ORDER BY…


LOGPARSER #18: Top 10 pages with most hits

Will give you your top pages with most hits and some additional data. If your top 10 pages with most hits are the same as your top slow pages and/or largest you might want to do something about it. Select    TOP 10    STRCAT(EXTRACT_PATH(cs-uri-stem),’/’) AS RequestPath,    EXTRACT_FILENAME(cs-uri-stem) AS RequestedFile,    COUNT(*) AS TotalHits,…


LOGPARSER #17: Get your broken links

This script will give you site/page refers to your content though your content has moved. SELECT     DISTINCT cs(Referer) as Referer,     cs-uri-stem as Url INTO     ReferBrokenLinks.txt FROM     logs\iis\ex*.log WHERE     cs(Referer) IS NOT NULL AND sc-status=404 AND (sc-substatus IS NULL OR sc-substatus=0) //Anders


LOGPARSER #16: Remove those Compilation Debug=True from your prod server

One thing I notice on several of my customers is that it really doesn’t matter how waterproof process you have for deploying web applications, and web.config files in particular. You’ll always end up with at least one web app somewhere with Compilation Debug = True. As you all know this hurts performance a lot, compilation…

1

LOGPARSER #15: Check traffic from IP addresses

Customer of mine used a hardware load balancer to distribute traffic between their frontend web servers. This script that I put together gave them a chance to check whether traffic was distributed evenly between servers (K’s, Hits), if average wait time was the same etc. 10.000 meter view what’s going on. Interesting enough customer also…

2

LOGPARSER #14: TOP 20 pages with specific HTTP return code

Digging into each ASPX page returning a specific error code. We used this script at a customer to get the pages with most 401 errors and also checked pages with most hits. You’ probably find these to be almost the same list. If you have Windows Authentication and your domain used NTLM instead of Kerberos…


LOGPARSER #13: Page types with large bytes sent

This is a great script for checking what page types are causing bytes sent SELECT     EXTRACT_EXTENSION(cs-uri-stem) AS PageType,     SUM(sc-bytes) as TotalBytesSent,     TO_INT(MUL(PROPSUM(sc-bytes), 100.0)) AS PercentBytes     INTO PagesWithLargestBytesSent.txt FROM     logs\iis\ex*.log GROUP BY     Pagetype ORDER BY     PercentBytes DESC Let say your CSS file had a lot of TotalBytesSent you might…


LOGPARSER #12: Troubleshoot who is causing your 500 errors?

This script is very interesting tracking down specific users causing errors in your IIS environment. Could be a physical person or a tool configured to run under a domain account. One of my customers had a tool for checking site availability and it was pinging several pages constantly (SLA check). What they didn’t know was…

3

LOGPARSER #11: Megabytes sent per HTTP status code

This script checks amount of bytes sent for different pages and different sc-status. SELECT     EXTRACT_EXTENSION(cs-uri-stem) AS PageType,     SUM(sc-bytes) as TotalBytesSent,     TO_INT(MUL(PROPSUM(sc-bytes), 100.0)) AS PercentBytes     INTO PagesWithLargestBytesSent.htm FROM     logs\iis\ex*.log GROUP BY     Pagetype ORDER BY     PercentBytes DESC Looking at the list below a couple of things are interesting. – You…