<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Mfartura's blog : IIS</title><link>http://blogs.technet.com/marcelofartura/archive/tags/IIS/default.aspx</link><description>Tags: IIS</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Troubleshooting IIS 100% CPU issues - Step by Step (intermediary)</title><link>http://blogs.technet.com/marcelofartura/archive/2006/09/15/troubleshooting-iis-100-cpu-issues-step-by-step-intermediary.aspx</link><pubDate>Fri, 15 Sep 2006 02:17:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:456363</guid><dc:creator>Marcelo Fartura</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/marcelofartura/comments/456363.aspx</comments><wfw:commentRss>http://blogs.technet.com/marcelofartura/commentrss.aspx?PostID=456363</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Processes&amp;nbsp;consuming 100% of a system's CPU time&amp;nbsp;is such a situation&amp;nbsp;everybody has faced at least once (likely much more than once :)), and normally as solution we just "kill the murderer" by stopping the culprit process.&amp;nbsp; But what was really causing that process to behave like that?&amp;nbsp; If you can't properly answer this question you might be convicted to&amp;nbsp;repeat the "kill the murderer" process forever...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The procedures we will see below are general enough for troubleshoot any application causing the 100% CPU situation, however I will use IIS as an example here since, as a&amp;nbsp;custom application's host, it is one of the products whereby this situation happens very often.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;EM&gt;Notice: This has been classified as an intermediary level content, so it presumes you understand concepts like memory dumps, crashes, hangs, applications, processes,&amp;nbsp;threads, call stacks etc,&amp;nbsp;and also have some experience with debugging.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Before the problem happens...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#9acd32 size=2&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff&gt;Step 1:&lt;/FONT&gt;&lt;BR&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Make sure you are familiar with and have the proper tools we will need for the further steps.&amp;nbsp; We will need the System Monitor (perfmon.exe), the &lt;A href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx" mce_href="http://www.microsoft.com/whdc/devtools/debugging/default.mspx"&gt;Debugging Tools for Windows&lt;/A&gt;&amp;nbsp;package installed (preferably installed at the c:\debuggers folder) and if possible the proper &lt;A href="http://www.microsoft.com/whdc/devtools/debugging/symbolpkg.mspx" mce_href="http://www.microsoft.com/whdc/devtools/debugging/symbolpkg.mspx"&gt;symbol files&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;You will also need some basic understanding about the IIS architecture.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff&gt;Step 2:&lt;/FONT&gt;&lt;BR&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Run the System Monitor (perfmon.exe), in a remote machine if possible, and create a new Counter Log: Chose any name, lets say "Performance_log".&amp;nbsp; After confirming the name you've just chosen, in the &lt;STRONG&gt;General Tab&lt;/STRONG&gt;, click in &lt;STRONG&gt;Add Objects&lt;/STRONG&gt; and choose "&lt;STRONG&gt;Select counter objects from comupter&lt;/STRONG&gt;".&amp;nbsp; In the combo list, select or type the remote computer name (the one where the problem happens&amp;nbsp;and which you're going to monitor)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Select the following objects::counters:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Processor(*)\*&lt;BR&gt;Process(*)\*&lt;BR&gt;Threads(*)\*&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Start monitoring and wait until the server gets the high CPU utilization issue&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;When the problem happens...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;FONT color=#0000ff&gt;Step 3:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR&gt;First confirm that is an IIS process (any w3wp.exe for IIS6, inetinfo.exe or any dllhost.exe&amp;nbsp;for IIS5/5.1 of inetinfo.exe or any&amp;nbsp;&amp;nbsp;MTX.exe - IIS4) that is consuming the CPU time. You can use even the task manager (CPU and Process columns) to confirm that.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;After identifying which process is consuming the CPU time, take a note of the Process ID of such a process from task manager.&amp;nbsp; You can also use other tools like tasklist.exe (builtin for Windows XP and Windows 2003) or tlist.exe&amp;nbsp;from the Debugging Tools for Windows.&amp;nbsp; For IIS5 servers, if you want to know what application is being hosted by the process (in case of a DLLHOST.EXE) you can use the Component Services mmc or simply run the following command from a command prompt:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&lt;EM&gt;c:\debuggers\&amp;gt;tlist -k | find /i "dllhost.exe"&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;It will list all the DLLHOST.EXE process and the respective applications being hosted by the processes in following output format:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;&lt;FONT face=Verdana size=2&gt;&lt;EM&gt;C:\Debuggers&amp;gt;tlist -k | find /i "dllhost"&lt;BR&gt;3496 dllhost.exe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyCom+ Application 01&lt;BR&gt;4892 dllhost.exe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyCom+ Applicatoin 02&amp;nbsp;&lt;BR&gt;4900 dllhost.exe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IIS Out_Of_Proc_Pooled&amp;nbsp;&lt;BR&gt;3840 dllhost.exe&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mts:&amp;nbsp;&amp;nbsp; System Application&lt;/EM&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;For the IIS4, the same assumption is valid except that you have MTS Explorer instead and the surrogate name will change from dllhost.exe to mtx.exe.&lt;BR&gt;For the IIS6 however, you can't use Component Services (IIS6 doesn't rely on COM+ for creating the surrogates as IIS5 does)&amp;nbsp;nor tlist.exe to identify the applications being hosted by the processes.&amp;nbsp; You will need to use the script iisapp.vbs instead (it's built in script for Windows 2003).&amp;nbsp; Run iisapp from a command prompt with no parameters and it will return a list with the w3wp.exe processes, their PID and the application pools being hosted by them.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;&lt;FONT color=#000080&gt;&lt;FONT color=#0000ff&gt;Step 4:&lt;/FONT&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/STRONG&gt;Once you've identified the PID (process ID) the CPU consumer you're ready to generate a hang memory dump (please note that the dump will contain useful information only, and if only, it was taken while the problem was happening).&amp;nbsp; To generate the dump execute the following commands from a command prompt:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;EM&gt;&lt;FONT color=#000080&gt;C:\Debuggers\&amp;gt;cscript adplus.vbs -hang -p &amp;lt;PID&amp;gt; -quiet -o c:\dumps&lt;/FONT&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Adplus will spawn a debugger (cdb.exe) which will attach to the process, generate the hang dump and dettach itself.&amp;nbsp; If you're familiar with the &lt;A href="http://www.iis.net/default.aspx?tabid=3&amp;amp;subtabid=31&amp;amp;g=5&amp;amp;i=895" mce_href="http://www.iis.net/default.aspx?tabid=3&amp;amp;subtabid=31&amp;amp;g=5&amp;amp;i=895"&gt;Debug Diagnostics Tool&lt;/A&gt; package (DebugDiag), feel free to use it.&amp;nbsp; It doesn't matter which tool you will use as long as you generate a good full dump.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Generally is a good practice to generate more 1 or 2 dumps repeating above procedure 1 minute apart from each other.&amp;nbsp; This might be useful when analyzing the problem cause.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Once the adplus.vbs is done, stop the perfmon log.&amp;nbsp; At this point you can also apply the workaround (likely kill the process) you've been applying to make your server reponsive again.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;Analyzing the data...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&lt;STRONG&gt;Step 5:&lt;BR&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Open the perfmon log:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Run perfmon , select System Monitor on the left navigation bar and type &lt;STRONG&gt;Ctrl + Q&lt;/STRONG&gt; to open the properties window.&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Click in the Source tab and select Log Files. Click add and select the c:\perflogs\Performance_log000001.blg file and click ok.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Press &lt;STRONG&gt;Ctrl + I&lt;/STRONG&gt;, or press the "+" button, to add objects and counters.&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Select &lt;STRONG&gt;Process object&lt;/STRONG&gt;, and the &lt;STRONG&gt;%Processor Time&lt;/STRONG&gt; counter, select all the IIS related processes, click add then close.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The system monitor window will show the %CPU utilization of each process. Press &lt;STRONG&gt;Ctrl+ B&lt;/STRONG&gt; to change the view to histogram. Determine the highest bar and double click it.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Press &lt;STRONG&gt;Ctrl+ H&lt;/STRONG&gt; to confirm you selected the highest bar on the histigram view. Determine which process is the one that owns the highest bar. It must to be the same as the one you identified on the task manager as the culprit.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Press &lt;STRONG&gt;Ctrl + E&lt;/STRONG&gt; to clean the histogram window and press CTRL + I to include new counters.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Select thread object, select %Processor Time counter and select all the instances of the process you determined as the culprit one.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Repeat the same process as before to determine which thread is the one consuming CPU - tip: Histogram is the best view to do that.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Once you know the process and thread within the process that is consuming the CPU, clean the perfmon System Monitor window one more time - &lt;STRONG&gt;Ctrl + E&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Press &lt;STRONG&gt;Ctrl + I&lt;/STRONG&gt; and select the Thread object again. Select the ID thread counter and select the instance of the previous determined thread. Click add and close. See how to simplify the Thread and Process ID identification in the perfmon in &lt;A href="http://blogs.technet.com/marcelofartura/archive/2006/09/14/456069.aspx" mce_href="http://blogs.technet.com/marcelofartura/archive/2006/09/14/456069.aspx"&gt;this article&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;In the System Monitor Window, determine the thread ID of thread by looking at Min, Max and Avg values. THey should be all the same. If they are not the same is because you have monitored for a longer period than the high CPU utilization one. If that happened press &lt;STRONG&gt;Ctrl + Q&lt;/STRONG&gt;, go to source tab and move the Time WIndow slide in order to get only the period of high utilization CPU, then go back to System Monitor Tool and chek for thread ID again.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Convert the Thread ID value from decimal to hexadecimal and take a note of this hex value.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;STRONG&gt;How about some debugging now?&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" face=Verdana color=#0000ff size=2&gt;&lt;STRONG&gt;Step 6:&lt;BR&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Open the &lt;STRONG&gt;Windbg.exe&lt;/STRONG&gt; from the &lt;STRONG&gt;c:\debuggers&lt;/STRONG&gt; folder.&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Press &lt;STRONG&gt;Ctrl &lt;/STRONG&gt;&lt;STRONG&gt;+ D&lt;/STRONG&gt; and select the hang dump (.dmp file) you generated earlier by uging adplus.vbs (they should be placed in the folder c:\dumps based on the option "-o c:\dumps" used before)&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face=Verdana size=2&gt;
&lt;P&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Close the Disassembly window if it opens (some versions of Windbg will do it autommaticaly)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Make sure your symbol path is properly set (remember to use the command &lt;FONT color=#000080&gt;&lt;EM&gt;!symfix&lt;/EM&gt;&lt;/FONT&gt; or set it manually to &lt;A href="http://msdl.microsoft.com/download/symbols" mce_href="http://msdl.microsoft.com/download/symbols"&gt;http://msdl.microsoft.com/download/symbols&lt;/A&gt;) and run the &lt;EM&gt;&lt;FONT color=#000080&gt;.reload /s&lt;/FONT&gt;&lt;/EM&gt; command if you needed to change the symbol path.&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;On the &lt;STRONG&gt;Windbg's command prompt&lt;/STRONG&gt;&amp;nbsp;type&lt;STRONG&gt; ~ &lt;/STRONG&gt;and press enter.&amp;nbsp; &lt;FONT face=Verdana size=2&gt;A thread list will show up as the example below:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;EM&gt;&lt;FONT color=#000080&gt;0:00&amp;gt; ~&lt;BR&gt;&amp;nbsp;&amp;nbsp; 0&amp;nbsp; Id: f4.f3 Suspend: 1 Teb: 7ffde000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 1&amp;nbsp; Id: f4.f7 Suspend: 1 Teb: 7ffdd000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 2&amp;nbsp; Id: f4.10a Suspend: 1 Teb: 7ffdb000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 3&amp;nbsp; Id: f4.10f Suspend: 1 Teb: 7ffda000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 4&amp;nbsp; Id: f4.110 Suspend: 1 Teb: 7ffd9000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 5&amp;nbsp; Id: f4.111 Suspend: 1 Teb: 7ffd8000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 6&amp;nbsp; Id: f4.112 Suspend: 1 Teb: 7ffd7000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 7&amp;nbsp; Id: f4.115 Suspend: 1 Teb: 7ffd6000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 8&amp;nbsp; Id: f4.116 Suspend: 1 Teb: 7ffd5000 Unfrozen&lt;BR&gt;&amp;nbsp;&amp;nbsp; 9&amp;nbsp; Id: f4.117 Suspend: 1 Teb: 7ffd4000 Unfrozen&lt;BR&gt;&amp;nbsp; 10&amp;nbsp; Id: f4.11a Suspend: 1 Teb: 7ffae000 Unfrozen&lt;BR&gt;&amp;nbsp; 11&amp;nbsp; Id: f4.11b Suspend: 1 Teb: 7ffad000 Unfrozen&lt;BR&gt;&amp;nbsp; 12&amp;nbsp; Id: f4.129 Suspend: 1 Teb: 7ffac000 Unfrozen&lt;BR&gt;&amp;nbsp; 13&amp;nbsp; Id: f4.12a Suspend: 1 Teb: 7ffab000 Unfrozen&lt;BR&gt;&amp;nbsp; 14&amp;nbsp; Id: f4.12e Suspend: 1 Teb: 7ffaa000 Unfrozen&lt;BR&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;The Id: identificator above is followed by the PID.TID where PID&amp;nbsp;is the hex representation of the process ID and TID is the hex representation of the thread ID.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Find the one which has the thread ID you determined before.&amp;nbsp; Tip: you can convert from hex to decimal by the the "?" in the debugger's command prompt. Ex.: "? f4" will generate the following output:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&lt;EM&gt;0:00&amp;gt; ? f4&lt;BR&gt;Evaluate expression: 244 = 000000f4&lt;BR&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Once you identified the thread in the list you have two options to set this thread's context the active one.&amp;nbsp; You run the following command with using the TID:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&lt;EM&gt;~~[TID]s&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Or you run the following command using the corresponding thread number (#):&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&lt;EM&gt;~#s&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Both command will produce the same result which is set the thread's context the active one in the debugger.&amp;nbsp; &lt;/FONT&gt;&lt;FONT face=Verdana size=2&gt;Now you can check the thread stack to see what is causing the high CPU utilization by just typing one of stack&amp;nbsp;commands (k).&amp;nbsp; For example, the &lt;FONT color=#000080&gt;&lt;EM&gt;kb&lt;/EM&gt;&lt;/FONT&gt; command will show you the stack with the some additional information like the three first arguments passed through the functions as below:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=1&gt;&lt;EM&gt;0:065&amp;gt; kb&lt;BR&gt;ChildEBP RetAddr&amp;nbsp; Args to Child&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;07c7bc20 623016d6 60a27460 07c7bff8 00000200 oran8!nnciqdn+0xab&lt;BR&gt;07c7bd3c 60b2695a 60a27460 00298880 07c7bff8 orantns8!nnftboot+0x6d6&lt;BR&gt;07c7bd68 60b25881 00298880 07c7bff8 00000200 oran8!nnfgqdn+0x3a&lt;BR&gt;07c7bdc0 60a10acf 60a27460 07c7e630 00000000 oran8!nnfgrne+0x2c1&lt;BR&gt;07c7c418 60b6e222 60a27460 07c7e630 00000016 oranl8!nlolgobj+0x6df&lt;BR&gt;07c7c458 60b27be0 60a27460 07c7e630 00298930 oran8!sntseltst+0xc072&lt;BR&gt;07c7c488 60b16472 60a27460 07c7e630 000000ff oran8!nnfsn2a+0x30&lt;BR&gt;07c7d600 60b60ebc 60a27460 00001803 07c7e630 oran8!niqname+0x252&lt;BR&gt;07c7f76c 604b0c93 07c7e630 00000007 00001803 oran8!osncon+0x23c&lt;BR&gt;07c7f94c 604b849e 07012e44 14414d22 00000007 ORACLIENT8!xaolog+0x1f533&lt;BR&gt;07c7f970 604b84ea 14414df8 14414d22 00000007 ORACLIENT8!xaolog+0x26d3e&lt;BR&gt;07c7f98c 604ba15d 14414df8 14414d22 00000007 ORACLIENT8!xaolog+0x26d8a&lt;BR&gt;07c7fe44 604bb128 14414df8 14414cf6 0000002b ORACLIENT8!xaolog+0x289fd&lt;BR&gt;07c7fe84 6047fed4 14414df8 14414cf6 ffffffff ORACLIENT8!xaolog+0x299c8&lt;BR&gt;07c7febc 604614a0 14414df8 14414cf6 ffffffff ORACLIENT8!upilog+0x64&lt;BR&gt;07c7fef0 10002642 14414db8 14414df8 14414cf6 ORACLIENT8!ocirlo+0xb0&lt;BR&gt;07c7ff84 7800265a 14414b90 01b0ed14 7800ef03 ociw32!olog+0x62&lt;BR&gt;07c7ffb8 77f04ef0 00297850 01b0ed14 7800ef03 MSVCRT!beginthreadex+0xb2&lt;BR&gt;07c7ffec 00000000 780025ff 00297850 00000000 KERNEL32!lstrcmpiW+0xbe&lt;BR&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;By looking at thread stack you should be able to identify what is causing the high CPU utilization problem.&amp;nbsp; You can always unassembly&amp;nbsp;(&lt;FONT color=#000080&gt;&lt;EM&gt;u&lt;/EM&gt;&lt;/FONT&gt;)&amp;nbsp;from the intruction pointer to try digging a little bit more and obtain some additional information.&amp;nbsp; Ex.:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&lt;EM&gt;0:065&amp;gt; u eip&lt;BR&gt;oran8!nnciqdn+0xab:&lt;BR&gt;60b1fefb 8b10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; edx,dword ptr [eax]&lt;BR&gt;60b1fefd 83c004&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eax,4&lt;BR&gt;60b1ff00 52&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; edx&lt;BR&gt;60b1ff01 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; eax&lt;BR&gt;60b1ff02 8b4510&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eax,dword ptr [ebp+10h]&lt;BR&gt;60b1ff05 53&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; ebx&lt;BR&gt;60b1ff06 50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; eax&lt;BR&gt;60b1ff07 56&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; push&amp;nbsp;&amp;nbsp;&amp;nbsp; esi&lt;BR&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I will post a real case analysis very soon in this blog...&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=456363" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/marcelofartura/archive/tags/Intermediary/default.aspx">Intermediary</category><category domain="http://blogs.technet.com/marcelofartura/archive/tags/Debug/default.aspx">Debug</category><category domain="http://blogs.technet.com/marcelofartura/archive/tags/Windbg/default.aspx">Windbg</category><category domain="http://blogs.technet.com/marcelofartura/archive/tags/Debugging/default.aspx">Debugging</category><category domain="http://blogs.technet.com/marcelofartura/archive/tags/100_2500_+CPU/default.aspx">100% CPU</category><category domain="http://blogs.technet.com/marcelofartura/archive/tags/IIS/default.aspx">IIS</category><category domain="http://blogs.technet.com/marcelofartura/archive/tags/High+Utilization/default.aspx">High Utilization</category></item></channel></rss>