Log parser is a free tool from Microsoft where developers and support technicians can use to parse the IIS logs, Event Logs and Active Directory logs. This tool helps the developers to find the root cause for the site related issues. This post explains common commands that we use to look for specific information in IIS logs.
The tool can be downloaded from here
The default location for IIS logs is %windir%\System32\LogFiles\W3SVC<SiteID>.
The websiteID for your web site can be found from IIS as follows
- Open IIS and right click on your website then see the logging path. In IIS 6.0 it gives a unique id for your website for logging.
Log parser is a command line tool where you need to write the SQL queries for parsing the log files. There is a GUI tool for Log parser named which can be downloaded from here
1. The most common requirement is to find the pages in your site which are running very slowly. You can write the following SQL query to see the pages that are running slow
2. If you want to determine how many internal server errors and other HTTP status code failures on your server then you can write the following command
3. To know the Number of hits to specific page in your website then write the following sql command
4. To display the Number of hits to specific page by specific user then use the following command
5. The following query can be used to get the TOP 10 URL’s requested from IIS log
6. write the following query in order to retrieve the total number of different browsers and number of different client IP addresses that requested pages from IIS server for particular web site.
7. To show the percentages against the pages that user requested, write the following query
8. Using Log parser with Event log.
|Share this post :|