Freigeben über


Top 10 Topics for MSCOM Ops…The TOOL MAN Cometh!! (Part 2)

More goodness from the MSCOM Ops tool belt…(with lots more to come!). My stars! We are just scratching the surface.

WCAT (Web Capacity Analysis Tool – Very useful web application stress tool for generating stress against a particular URL or a set of URLs. Can be combined with logparser output to simulate traffic against a server using production IIS log files. Available in the IIS 6.0 Resource Kit

https://www.microsoft.com/downloads/details.aspx?FamilyID=56fc92ee-a71a-4c73-b628-ade629c89499&DisplayLang=en

Example:

‘Generate a WCAT UBR file using logparser and production logs, then use the UBR file to stress SERVERNAME with WCAT

                       

 ‘Create the UBR file using logparser against a production IIS log

 Logparser file:WCAT.SQL –o:TPL –tpl:WCAT.TPL

 wcctrl.exe –a SERVERNAME –z stressfile.ubr

 wcclient.exe 127.0.0.1

                       

Wcat.sql

 SELECT TOP 10 
                EXTRACT_TOKEN(cs-uri-query,0,'|') AS Query,
                STRCAT(cs-uri-stem, REPLACE_IF_NOT_NULL(cs-uri-query,STRCAT('?',Query))) AS URI,
                sc-status AS STATUS,
                cs-method AS VERB,
                COUNT(*) AS TOTAL,
                SEQUENCE(1) AS UID 
 INTO StressFile.ubr
 FROM %windir%\system32\logfiles\w3svc1\ex*.log
 WHERE (cs-method = 'GET')
 GROUP BY URI, VERB, STATUS, Query
 ORDER BY TOTAL DESC
  

Wcat.tpl

 <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>

Comments

  • Anonymous
    January 01, 2003
    Introduction Reality sat in when I, along with Wade Hilmo &amp;amp; Alexis Eller, headed to Europe for the