WCAT.tpl
This template file creates a WCAT load script with the top 10 URL found in the IIS log files (generated by the WCAT.sql query file):
<LPHEADER>[Configuration]
NumClientMachines: 1 # number of distinct client machines to use
NumClientThreads: 100 # number of threads per machine
AsynchronousWait: TRUE # asynchronous wait for think and delay
Duration: 5m # length of experiment (m = minutes, s = seconds)
MaxRecvBuffer: 8192K # suggested maximum received buffer
ThinkTime: 0s # maximum think-time before next request
WarmupTime: 5s # time to warm up before taking statistics
CooldownTime: 6s # time to cool down at the end of the experiment
[Performance]
[Script]
SET RequestHeader = "Accept: */*\r\n"
APP RequestHeader = "Accept-Language: en-us\r\n"
APP RequestHeader = "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705)\r\n"
APP RequestHeader = "Host: %HOST%\r\n"
</LPHEADER>
<LPBODY>
NEW TRANSACTION
classId = %UID%
NEW REQUEST HTTP
ResponseStatusCode = %STATUS%
Weight = %TOTAL%
verb = "%VERB%"
URL = "%URI%"
</LPBODY>
<LPFOOTER>
</LPFOOTER>
To run this example, type the following command:
LogParser file:WCAT.sql -o:TPL -tpl:WCAT.tpl
start wcctrl.exe -a myserver -z StressFile.ubr start wcclient.exe 127.0.0.1
Tinyget.tpl
This template file creates a Tinyget script file with the top 10 URL found in the IIS log files (generated by the Tinyget.sql query file):
<LPBODY>-srv:%HOST% -uri:%URI% -status:%STATUS% -verb:%VERB%
</LPBODY>
To run this example, type the following command:
LogParser file:Tinyget.sql -o:TPL -tpl:Tinyget.tpl
tinyget.exe -z Urls.txt
ASPErrors.tpl
This template file creates a text report with information about ASP 500 errors (generated by the ASPErrors.sql query file):
<LPBODY>The URL %Uri% had the error:"%ErrorMsg%" on line %LineNo%, %Total% time(s)
</LPBODY>
To run this example, type the following command:
LogParser file:ASPErrors.sql -o:TPL -tpl:ASPErrors.tpl
StatusCodes.tpl
This template file creates an HTML document containing a summary information about all the HTTP Status codes in the supplied log files
(generated by the StatusCodes.sql query file):
<LPHEADER>
<HTML>
<HEAD><TITLE>Summary of HTTP Status Codes</TITLE></HEAD>
<BODY BGCOLOR="#EFEFFF">
<TABLE BORDER="1" CELLPADDING="2" CELLSPACING="2">
<TR>
<TH COLSPAN="2" ALIGN="CENTER">HTTP Status Summary</TH>
</TR>
<TR>
<TH>HTTP Status Code</TH>
<TH>Hit Count</TH>
</TR>
</LPHEADER>
<LPBODY>
<TR>
<TD>%Status%</TD>
<TD>%Total%</TD>
</TR>
</LPBODY>
<LPFOOTER>
</TABLE>
</BODY>
</HTML>
</LPFOOTER>
To run this example, type the following command:
LogParser file:StatusCodes.sql -o:TPL -tpl:StatusCodes.tpl
To view the result, open the output file "StatusCodes.html" in the Browser.
ReferBrokenLinks.tpl
This template file creates an HTML document containing all the pages that are currently referencing non-existing Url's in the supplied log files
(generated by the ReferBrokenLinks.sql query file):
<LPHEADER>
<HTML>
<HEAD><TITLE>Pages having broken links to this site</TITLE></HEAD>
<BODY BGCOLOR="#EFEFFF">
<TABLE BORDER="1" CELLPADDING="2" CELLSPACING="2">
<TR>
<TH COLSPAN="2" ALIGN="CENTER">Pages having broken links to this site</TH>
</TR>
<TR>
<TH>Page with broken link</TH>
<TH>Broken link</TH>
</TR>
</LPHEADER>
<LPBODY>
<TR>
<TD><A HREF="%Referer%">%Referer%</A></TD>
<TD>%Url%</TD>
</TR>
</LPBODY>
<LPFOOTER>
</TABLE>
</BODY>
</HTML>
</LPFOOTER>
To run this example, type the following command:
LogParser file:ReferBrokenLinks.sql -o:TPL -tpl:ReferBrokenLinks.tpl
To view the result, open the output file "ReferBrokenLinks.html" in the Browser.