SharePoint IIS Traffic Analysis
Internally we have experienced situations where internal users have built tools or solutions which have negatively affected performance for our SharePoint users. This can be done in different ways such as Setting up multiple MOSS Farms to crawl our customer facing front ends at high performance setting or creating a custom application to execute against various MOSS web services without throttling the application in any way. From that need spawned a little tool we created with the help of log parser
Please remember to never perform any of the following on production without first trying it out in a test environment, all items here are merely examples of how you ‘could’ perform such an action. J
Skills and Items required / assumed to perform this task.
· A SQL 2005 server with XP_CMDSHELL enabled
· Read Permissions for SQL Server Account Granted to the IIS Log directory of your SharePoint Servers
· Access to create and modify databases on your SQL Server
· Logparser 2.2 Installed on your SQL Server
· Good Understanding of SQL Server and TSQL
· Good Understanding of IIS
· Access to all customer Facing SharePoint Front Ends
· Good Understanding of SharePoint J
Step 1: Create a reporting database on your SQL Server, for the benefit of this blog entry we will call this database IISReports. Set that reporting database to autogrow for the data file and log file.
Step 2: Grant read permissions to all IIS log directories where your Web application Logs are stored on all servers you wish to report on.
Example: %WINDIR%\System32\Logfiles\ex080218.log For better performance internally we place our IIS Log files on a serperate drive
Step 3: Install Logparser 2.2 to a directory on your sql server(make note of this directory) For the purpose of this entry we will call this c:\temp\logparser.exe
Logparser 2.2 can be downloaded @ http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx
Step 4: Create Tables that we will use to pull in and manipulate the data
Click Here to open example Script
Step 5: execute the Create script for the stored procedure that will be used to pull the data.
Click Here to Open example Script – Make sure to read the /**notes**/ as they direct you to make changes to the script to cater to your environment.
Step 6: If everything has been followed and updated accordingly you can now run the following in SQL.. shortly there after you will receive an email similar to the following J
Example email received
Top 20 for BW used
Top 20 for Total Hits
Bandwidth Used (MB)