Detecting ASP Website Errors Using Microsoft Log Parser
page 2 of 3
by Brett Burridge
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 23715/ 48

Configuring Microsoft Log Parser to look for 500 server errors

This Log Parser query assumes that the logs are in c:\logs\web and that IIS has been configured to log in Microsoft's W3C extended log format.  With modified syntax this query could be used to analyze log files in other formats.

The query can be run from a DOS prompt within the Log Parser installation folder.  To save excessive typing or pasting into command prompt windows the whole query can be saved as a .bat file.

logparser "SELECT [cs-uri-stem], [cs-uri-query], Count(*) AS [Hits]
FROM c:\logs\web\ex*.log
WHERE sc-status = 500
GROUP BY [cs-uri-stem], [cs-uri-query]
order by [hits], [cs-uri-stem] DESC" -rtp:-1 -i:iisw3c

Once the query has been put into a batch file (Find500Errors.bat), it can be run using the following when typed at the command prompt (which will produce an output file called 500Errors.txt).

Find500Errors.bat > 500Errors.txt


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2022 ASPAlliance.com  |  Page Processed at 2022-10-01 10:09:22 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search