LOGPARSER #10: Check your substatus codes

If you find out that you have a large number of sc-status codes, e.g. 401, it could be an idea to check the sc-substatus codes. SELECT     sc-status,     sc-substatus,     Count(*) AS Total     INTO 401subcodes.txt FROM     logs\iis\ex*.log WHERE     sc-status=401 GROUP BY     sc-status,     sc-substatus ORDER BY     sc-status,     sc-substatus…


LOGPARSER #9: Check your Win32 errors trends

This script will get you any win32 errors within you IIS logs. SELECT     sc-win32-status as ErrorNumber,     WIN32_ERROR_DESCRIPTION(sc-win32-status) as ErrorDesc,     Count(*) AS Total     INTO Win32ErrorNumbers.txt FROM     logs\iis\ex*.log WHERE     sc-win32-status>0 GROUP BY     ErrorNumber ORDER BY     Total DESC You can also check these errors by day to see any trends….


Logparser #8: Know your Error trends

This is a script I used at one customer to help the site developers know if any of the recent deployed updates had any affect on the site errors. SELECT   TO_STRING(To_timestamp(date, time), ‘MMdd’) AS Day,   SUM(c200) AS 200s,   SUM(c206) AS 206s,   SUM(c301) AS 301s,   SUM(c302) AS 302s,   SUM(c304) AS…


LOGPARSER #7: Average time taken per user

Why is this interesting? One of the site developers at one of my customers approached me and said that “Hey, you know we have a couple of internal users who complain about our website performance. They say its always slow and takes forever for pages to load….”. My response was “Ok, what data do you…


LOGPARSER #6: Check daily bandwidth

This script checks for daily bandwidth. Great for spotting trends. Select      To_String(To_timestamp(date, time), ‘MM-dd’) As Day,      Div(Sum(cs-bytes),1024) As Incoming(K),      Div(Sum(sc-bytes),1024) As Outgoing(K) Into BandwidthByDay.gif From     logs\iis\ex*.log Group By     Day You can also convert this into local time and check bytes sent by the server. We used this at my customer…


LOGPARSER #5: Top 10 slowest ASPX pages

Top 10 pages with the longest time-taken SELECT TOP 10     cs-uri-stem,     max(time-taken) as MaxTime,     avg(time-taken) as AvgTime INTO     toptimetaken.txt FROM     logs\iis\ex*.log WHERE     extract_extension(to_lowercase(cs-uri-stem)) = ‘aspx’ GROUP BY     cs-uri-stem ORDER BY     MaxTime DESC Top 10 pages with the longest time-taken a specific day. Great if you have customers…

1

LOGPARSER #4: Top 10 largest ASPX pages

Script for checking your largest pages. Maybe you can reduce the size of these pages? Good to know before a performance test etc Select      Top 10      StrCat(Extract_Path(TO_Lowercase(cs-uri-stem)),’/’) AS  RequestedPath,      Extract_filename(To_Lowercase(cs-uri-stem)) As RequestedFile,       Count(*) AS Hits,      Max(time-taken) As MaxTime,      Avg(time-taken) As AvgTime,      Max(sc-bytes) As BytesSent     INTO top10pagesbysize.txt FROM…


LOGPARSER #3: Unique users per day

This is a combination of two scripts you need to use to get the unique number of users each day. This is for Logparser 2.2 and earlier if i remember correct. Maybe later version will give you this in another way. I’ve seen a variety of samples out there but this is the only true…


LOGPARSER #2: Know what browsers your users have

This script will give you all the browser types hitting your site, order by most used. SELECT      distinct cs(User-Agent),     count(*) as hits     INTO useragentsalltypes.txt FROM      logs\iis\ex*.log  GROUP BY     cs(user-agent) ORDER BY      hits DESC //Anders


LOGPARSER #1: Top 10 images by size sent

This script is an easy way of checking if any of your pictures take up too much bandwidth on you site. Maybe you can resize them or change resolution?  Select   Top 10   StrCat(Extract_Path(TO_Lowercase(cs-uri-stem)),’/’) AS   RequestedPath,   Extract_filename(To_Lowercase(cs-uri-stem)) As RequestedFile,   Count(*) AS Hits,   Max(time-taken) As MaxTime,   Avg(time-taken) As AvgTime,   Max(sc-bytes)…