Top20URIs.sql

Description

Reports the Top 20 URIs on a site with the following additional information: maximum time taken, average time taken, and average number of bytes sent. To use this query, type: "LogParser file:Top20URIs.sql –i:iisw3c".

Requirements

You must install and use the Log Parser tool.

Supported Platforms

Windows Server 2003

Yes

Windows XP

Yes

Windows 2000

Yes

Script Code

SELECT TOP 20    cs-uri-stem,
      COUNT(*) AS Total,
      MAX(time-taken) AS MaxTime,
      AVG(time-taken) AS AvgTime,
      AVG(sc-bytes) AS AvgBytesSent
FROM ex*.log
GROUP BY cs-uri-stem
ORDER BY Total DESC

For any feedback regarding the content of this sample script, please write to Microsoft TechNet. Please be aware that a response is not guaranteed.

Disclaimer

The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.