<?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>Mike Lagase : Tracing</title><link>http://blogs.technet.com/mikelag/archive/tags/Tracing/default.aspx</link><description>Tags: Tracing</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>How to enable Store PFD tracing upon Reboot</title><link>http://blogs.technet.com/mikelag/archive/2008/08/22/how-to-enable-store-pfd-tracing-upon-reboot.aspx</link><pubDate>Fri, 22 Aug 2008 16:59:37 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3110323</guid><dc:creator>mikelag</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/mikelag/comments/3110323.aspx</comments><wfw:commentRss>http://blogs.technet.com/mikelag/commentrss.aspx?PostID=3110323</wfw:commentRss><description>&lt;p&gt;Tracing Store startup problems upon server reboot is not an easy task as ExTRA tracing does not survive the server being rebooted whereas in Exchange 2003, the “Enable Tracing” key did survive a reboot.&lt;/p&gt;  &lt;p&gt;After enabling an ExTRA session for PFD store startup tracing and looking at the contents of what was enabled when doing this, you will see the following from a command prompt.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_8E2C/image_2.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="240" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_8E2C/image_thumb.png" width="531" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Notice the &lt;b&gt;“Microsoft Exchange Server 2007” &lt;/b&gt;provider with its GUID of &lt;b&gt;79bb49e6-2a2c-46e4-9167-fa122525d540. &lt;/b&gt;This is the provider that Exchange 2007 uses for most of its tracing&lt;/p&gt;  &lt;p&gt;So now we need a way to trace this out. First, we need to create a method to enable logging and another way to enable the logging upon reboot of the server&lt;/p&gt;  &lt;h2&gt;&lt;font color="#0080c0"&gt;Enable Tracing&lt;/font&gt;&lt;/h2&gt;  &lt;h4&gt;Method 1&lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;Logman (Built in to the OS)&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;---------------&lt;/p&gt;  &lt;p&gt;1. Create a directory called Tracing (ex. C:\tracing)&lt;/p&gt;  &lt;p&gt;2. Create the trace log using the &lt;b&gt;“Microsoft Exchange Server 2007”&lt;/b&gt; provider that Exchange 2007 tracing uses. The GUID or the name of the provider can be used as shown below.     &lt;br /&gt;    &lt;br /&gt;logman create trace ExchangeDebugTraces -p {79bb49e6-2a2c-46e4-9167-fa122525d540} -nb 3 25 -bs 3 -o c:\Tracing\&lt;/p&gt;  &lt;p&gt;logman create trace ExchangeDebugTraces -p &amp;quot;&lt;b&gt; &lt;/b&gt;Microsoft Exchange Server 2007&amp;quot; -nb 3 25 -bs 3 -o c:\Tracing\&lt;/p&gt;  &lt;p&gt;After performing this, you can see this using a logman query command.&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_8E2C/image_4.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="84" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_8E2C/image_thumb_1.png" width="531" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;3. Create an EnabledTraces.Config file and add the following information to it and then save this file to the root of your C: drive. C:\EnabledTraces.Config&lt;/p&gt;  &lt;p&gt;TraceLevels:Pfd    &lt;br /&gt;Store:tagPFDServerStart     &lt;br /&gt;FilteredTracing:No     &lt;br /&gt;InMemoryTracing:No&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note: &lt;/strong&gt;You could also create this same file by using the ExTRA interface to enable this tracing as well, thus populating the same information as listed above.&lt;/p&gt;  &lt;p&gt;4. Create a &lt;b&gt;start_tracing.cmd&lt;/b&gt; file and add the following information to the file. Save this to the location created in Step 1.&lt;/p&gt;  &lt;p&gt;Logman start ExchangeDebugTraces    &lt;br /&gt;Running logman query shows this trace running.&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_8E2C/image_6.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="96" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_8E2C/image_thumb_2.png" width="531" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;5. Create a &lt;b&gt;stop_tracing.cmd&lt;/b&gt; file and add the following information to the file. Save this to the location created in Step 2.     &lt;br /&gt;    &lt;br /&gt;logman stop ExchangeDebugTraces&lt;/p&gt;  &lt;h4&gt;Method 2&lt;/h4&gt;  &lt;h5&gt;Tracelog&lt;/h5&gt;  &lt;p&gt;6. Download and install tracelog from &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=55E51B3B-6C26-4CA0-ABF1-0E51D92B8298&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=55E51B3B-6C26-4CA0-ABF1-0E51D92B8298&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;7. Create a directory called Tracing (ex. C:\tracing)&lt;/p&gt;  &lt;p&gt;8. Copy tracelog.exe to this directory from the default install location of c:\program files(x86)\Resource Kit.&lt;/p&gt;  &lt;p&gt;9. Create a &lt;b&gt;start_tracing.cmd&lt;/b&gt; file and add the following information to the file. Save this to the location created in Step 2.&lt;/p&gt;  &lt;p&gt;tracelog.exe -start ExchangeDebugTraces -f c:\Tracing\ExchangeDebugTraces.etl -seq 3500 -guid control.guid&lt;/p&gt;  &lt;p&gt;10. Create a &lt;b&gt;stop_tracing.cmd&lt;/b&gt; file and add the following information to the file. Save this to the location created in Step 2.&lt;/p&gt;  &lt;p&gt;tracelog.exe -stop ExchangeDebugTraces&lt;/p&gt;  &lt;p&gt;11. Create a control.guid file and then add the appropriate GUID for &lt;b&gt;Microsoft Exchange Server 2007&lt;/b&gt; tracing. Note: This GUID should be the only piece of information in this file. Save this to the c:\tracing directory.&lt;/p&gt;  &lt;p&gt;79bb49e6-2a2c-46e4-9167-fa122525d540&lt;/p&gt;  &lt;p&gt;12. Create an EnabledTraces.Config file and add the following information to it and then save this file to the root of your C: drive. C:\EnabledTraces.Config&lt;/p&gt;  &lt;p&gt;TraceLevels:Pfd    &lt;br /&gt;Store:tagPFDServerStart     &lt;br /&gt;FilteredTracing:No     &lt;br /&gt;InMemoryTracing:No&lt;/p&gt;  &lt;p&gt;13. To verify if these batch files work successfully, run &lt;b&gt;start_tracing.cmd&lt;/b&gt; and then run &lt;b&gt;tracelog –q ExchangeDebugTraces&lt;/b&gt; to check if we are now tracing&amp;#160; &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_8E2C/image_8.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="250" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_8E2C/image_thumb_3.png" width="497" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This looks good. We are now happily tracing using PFD store startup tracing.&lt;/p&gt;  &lt;p&gt;14. Run &lt;b&gt;stop_tracing.cmd &lt;/b&gt;to stop the tracing.&lt;/p&gt;  &lt;h2&gt;&lt;font color="#0080c0"&gt;Enable Logging upon bootup&lt;/font&gt;&lt;/h2&gt;  &lt;p&gt;On Windows 2003 and Windows 2008 servers, we can enable this tracing when the server is rebooted by using the built-in utility called &lt;strong&gt;Schtasks&lt;/strong&gt;. More information regarding this tool can be found in the following locations&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/2e713203-3dd8-491b-b9e1-9423618dc7e8"&gt;Windows 2008 schtasks help&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://technet.microsoft.com/en-us/library/1d284efa-9d11-46c2-a8ef-87b297c68d17"&gt;Windows 2003 schtasks help&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;To create a new scheduled task, open a command prompt and type the following:    &lt;br /&gt;    &lt;br /&gt;&lt;em&gt;schtasks /create /tn &amp;quot;Start Store PFD Tracing Upon Reboot&amp;quot; /tr &amp;quot;C:\tracing\start_tracing.cmd&amp;quot; /sc onstart /ru &amp;quot;&amp;quot;      &lt;br /&gt;&lt;/em&gt;    &lt;br /&gt;&lt;strong&gt;Note: &lt;/strong&gt;Specifying &amp;quot;&amp;quot; for the /RU switch, tells the task to run as SYSTEM.     &lt;br /&gt;    &lt;br /&gt;To verify that the scheduled task has been added properly, type &lt;strong&gt;schtasks&lt;/strong&gt; from a command prompt. This should return the &lt;em&gt;&lt;strong&gt;'TaskName&amp;quot;&lt;/strong&gt;&lt;/em&gt; and the &lt;em&gt;&amp;quot;Next Run Time&amp;quot;&lt;/em&gt; of &lt;em&gt;&lt;strong&gt;&amp;quot;At system start up&amp;quot;&lt;/strong&gt;&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;You could also view this in the Control Panel under Scheduled Tasks    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_7439/image_14.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="70" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableStorePFDtracinguponReboot_7439/image_thumb_6.png" width="435" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Reboot the server and the tracing will begin before the Information Store service starts.&lt;/p&gt;  &lt;p&gt;Once the tracing has been collected, it is important to stop tracing and then remove this schtask to prevent this tracing from occurring in the future upon reboots.&lt;/p&gt;  &lt;p&gt;To stop tracing, simply launch the stop_tracing.cmd file in the c:\tracing directory.&lt;/p&gt;  &lt;p&gt;To remove the scheduled event, type the following command:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;schtasks /delete /TN &amp;quot;Start Store PFD Tracing Upon Reboot&amp;quot;&lt;/em&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Unfortunately, the trace file cannot be read unless you are working with Microsoft Support representative, but at least this will give you some ways that will help catch problems as they occur and when they occur. These methods can be applied for any ExTRA tracing in general, so this is not just limited to tracing Store Startup issues.&lt;/p&gt;  &lt;p&gt;Happy Troubleshooting!!&lt;/p&gt;  &lt;p&gt;Mike&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3110323" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/mikelag/archive/tags/Tracing/default.aspx">Tracing</category></item><item><title>Using ExTRA to find long running transactions inside Store</title><link>http://blogs.technet.com/mikelag/archive/2008/08/21/using-extra-to-find-long-running-transactions-inside-store.aspx</link><pubDate>Thu, 21 Aug 2008 17:40:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3109819</guid><dc:creator>mikelag</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/mikelag/comments/3109819.aspx</comments><wfw:commentRss>http://blogs.technet.com/mikelag/commentrss.aspx?PostID=3109819</wfw:commentRss><description>&lt;p&gt;During your normal flow of troubleshooting performance for Exchange, you may have the need to see what functions might be consuming higher than normal resources on your Exchange server. These functions might be causing spikes in CPU usage or sustained CPU usage over time.&lt;/p&gt;  &lt;p&gt;Luckily, the Exchange Troubleshooting Assistant could help you gather the necessary data to understand what is going on inside store without having the need to dump the store process and then calling Support for analysis of this file.&lt;/p&gt;  &lt;p&gt;Mind you, this doesn't cover every scenario, but will help to bring out some of the more common issues you may see with latent calls. Here is a short list of what we could report on:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Slow LSASS calls &lt;/li&gt;    &lt;li&gt;Slow Directory lookups &lt;/li&gt;    &lt;li&gt;Long running Virus Scanner calls &lt;/li&gt;    &lt;li&gt;IMAIL conversion &lt;/li&gt;    &lt;li&gt;Jet Snapshot calls taking a long time &lt;/li&gt;    &lt;li&gt;Slow calls (read/write) to the database &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;With that said, let's get on to running the tool. It is important to note that this tool should be run during the time of the problem, not after as whatever it was causing the issue, is now gone. &lt;/p&gt;  &lt;h2&gt;Start ExTRA&lt;/h2&gt;  &lt;p&gt;To start the tool, you can do this either of two ways.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Using the Performance Troubleshooter tool in the Exchange Management Console (EMC) under Toolbox      &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_14.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_14.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_2.png" width="405" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_2.png" /&gt;&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Directly launching &lt;strong&gt;ExTRA.Exe&lt;/strong&gt; from the \program files\Microsoft\Exchange Server\bin directory&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_17.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_17.png"&gt;       &lt;br /&gt;        &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="343" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_3.png" width="344" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_3.png" /&gt;&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;Click on the &amp;quot;Select a Task&amp;quot; option in the menu on the left, Then select the &amp;quot;&lt;strong&gt;Performance Troubleshooter&amp;quot;&lt;/strong&gt; in the list of tasks. &lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_2.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_2.png"&gt;       &lt;br /&gt;        &lt;br /&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="230" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb.png" width="644" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb.png" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;h2&gt;Configuring ExTRA for a new session&lt;/h2&gt;  &lt;blockquote&gt;   &lt;p&gt;Once the Performance Troubleshooter has been selected, Enter an identifying name for this run. Click &lt;strong&gt;Next&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image3.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image3.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="304" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image3_thumb.png" width="644" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image3_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;In the drop down list, select &amp;quot;&lt;strong&gt;The number of outstanding RPC requests is high&lt;/strong&gt;&amp;quot;. Click &lt;strong&gt;Next&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image6.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image6.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="273" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image6_thumb.png" width="644" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image6_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;Enter the appropriate Exchange server name and Global Catalog Server name.&lt;strong&gt; Note:&lt;/strong&gt; If you are logging on from an account that does not have permissions to the Exchange server, select the &amp;quot;&lt;em&gt;Show advanced login options&lt;/em&gt;&amp;quot; to enter a different set of credentials. Click &lt;strong&gt;Next&lt;/strong&gt; when done.&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image9.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image9.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="269" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image9_thumb.png" width="644" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image9_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;Select a location to store the Performance logs &lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_23.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_23.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="346" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_6.png" width="644" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_6.png" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;Select &amp;quot;Show advanced data collection options&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_27.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_27.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="45" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_8.png" width="244" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_8.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;Make sure that &amp;quot;Collect Function log (FCL) data is selected. Click &lt;strong&gt;Next&lt;/strong&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_25.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_25.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="428" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_7.png" width="644" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_7.png" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;The trace will the start and collect data for 3 minutes and then perform some statistical analysis on the data collected.&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image18.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image18.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image18_thumb.png" width="644" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image18_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;You will then be presented with the results of the analysis and then tell you if any function calls are consuming an exorbitant amount of time. If anything if found, it will be reported here. In this case, there was not a problem on the server, but if there was, it would be reported right here.&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_29.png" mce_href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_29.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="268" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_9.png" width="644" border="0" mce_src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/UsingExTRAtofindlongrunningfunctionc.exe_B894/image_thumb_9.png" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;This may give you some immediate clues in less than 5 minutes on what might be occurring inside the store process. &lt;/p&gt;    &lt;p&gt;Happy Troubleshooting!!&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3109819" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/mikelag/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.technet.com/mikelag/archive/tags/Tracing/default.aspx">Tracing</category></item><item><title>How to enable Exchange User Monitor tracing via the command line</title><link>http://blogs.technet.com/mikelag/archive/2008/08/20/how-to-enable-exchange-user-monitor-tracing-via-the-command-line.aspx</link><pubDate>Wed, 20 Aug 2008 15:09:28 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3108970</guid><dc:creator>mikelag</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/mikelag/comments/3108970.aspx</comments><wfw:commentRss>http://blogs.technet.com/mikelag/commentrss.aspx?PostID=3108970</wfw:commentRss><description>&lt;p&gt;For troubleshooting Exchange user performance related issues or to help plan your design for Exchange 2007, Exchange User Monitor (Exmon) is a great utility to have in your tool bag and contains a wealth of knowledge on your current user activities. Exmon has been previously talked about at &lt;a href="http://msexchangeteam.com/archive/2005/04/06/403409.aspx"&gt;http://msexchangeteam.com/archive/2005/04/06/403409.aspx&lt;/a&gt; and some FAQs regarding the tool can be seen at &lt;a href="http://msexchangeteam.com/archive/2005/06/13/406276.aspx"&gt;http://msexchangeteam.com/archive/2005/06/13/406276.aspx&lt;/a&gt;. There is also another link which is much harder to find at &lt;a href="http://technet.microsoft.com/en-us/library/bb508855(EXCHG.65).aspx"&gt;http://technet.microsoft.com/en-us/library/bb508855(EXCHG.65).aspx&lt;/a&gt; which explains how to use the tool in much greater detail.&lt;/p&gt;  &lt;p&gt;Exmon tracing uses the ETW (Event Tracing for Windows) facility of Windows to send internal application event data to .etl files for later analysis. Detailed information regarding this tracing can be found in the Windows DDK at &lt;a href="http://msdn2.microsoft.com/en-us/library/aa468736.aspx"&gt;http://msdn2.microsoft.com/en-us/library/aa468736.aspx&lt;/a&gt; and also in &lt;a href="http://msdn2.microsoft.com/en-us/library/aa363668.aspx"&gt;http://msdn2.microsoft.com/en-us/library/aa363668.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;ETW tracing uses event providers that were specifically written for an application or driver and can be referenced either by its name or by its GUID. To view a list of current providers, run &lt;b&gt;logman query providers &lt;/b&gt;from a command prompt which will give you a list similar to the below screenshot.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableExchangeUserMonitortracingvia_88B9/image_2.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="316" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableExchangeUserMonitortracingvia_88B9/image_thumb.png" width="531" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Notice the &lt;b&gt;Exchange Information Store &lt;/b&gt;provider with its GUID of &lt;b&gt;2EACCEDF-8648-453e-9250-27F0069F71D2. &lt;/b&gt;This is the provider that ExMon uses for its tracing and is also the information that is needed later on this article to enable ETW tracing from a command line. Please note that this article will work on Exchange 2003 or Exchange 2007 servers as the provider GUID has not changed.&lt;/p&gt;  &lt;h3&gt;Prerequisite&lt;/h3&gt;  &lt;p&gt;Before enabling ExMon tracing, the following registry keys must be added to the registry to allow Exmon to collect data in the ETL file. &lt;/p&gt;  &lt;p&gt;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem]    &lt;br /&gt;&amp;quot;RpcEtwTracing&amp;quot;=dword:00000001&lt;/p&gt;  &lt;p&gt;[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WMI\Trace]    &lt;br /&gt;&amp;quot;UsePerformanceClock&amp;quot;=dword:00000001&lt;/p&gt;  &lt;p&gt;To enable tracing on any given server, there is essentially 2 methods that can be used to create and start/stop Exmon tracing. &lt;/p&gt;  &lt;h2&gt;&lt;font color="#0080c0"&gt;Method 1&lt;/font&gt;&lt;/h2&gt;  &lt;h4&gt;Tracelog&lt;/h4&gt;  &lt;p&gt;1. Download and install tracelog from &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=55E51B3B-6C26-4CA0-ABF1-0E51D92B8298&amp;amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=55E51B3B-6C26-4CA0-ABF1-0E51D92B8298&amp;amp;displaylang=en&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;2. Create a directory called Tracing (ex. C:\tracing)&lt;/p&gt;  &lt;p&gt;3. Copy tracelog.exe to this directory from the default install location of c:\program files\Resource Kit.&lt;/p&gt;  &lt;p&gt;4. Create a &lt;b&gt;start_tracing.cmd&lt;/b&gt; file and add the following information to the file. Save this to the location created in Step 2.&lt;/p&gt;  &lt;p&gt;tracelog.exe -start Exmon_Trace -f c:\Tracing\Exmon_trace.etl -seq 3500 -guid control.guid&lt;/p&gt;  &lt;p&gt;5. Create a &lt;b&gt;stop_tracing.cmd&lt;/b&gt; file and add the following information to the file. Save this to the location created in Step 2.&lt;/p&gt;  &lt;p&gt;tracelog.exe -stop Exmon_Trace&lt;/p&gt;  &lt;p&gt;6. Create a control.guid file and then add the appropriate GUID for Exmon tracing. Note: This GUID should be the only piece of information in this file. Save this to the location created in Step 2.&lt;/p&gt;  &lt;p&gt;2EACCEDF-8648-453e-9250-27F0069F71D2&lt;/p&gt;  &lt;p&gt;7. To verify if these batch files work successfully, run &lt;b&gt;start_tracing.cmd&lt;/b&gt; and then run &lt;b&gt;tracelog -l &lt;/b&gt;and look for an entry call &lt;b&gt;Exmon_Trace&lt;/b&gt;. If this is found in the list, then the tracing has been enabled as shown below.     &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableExchangeUserMonitortracingvia_7290/image_4.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="211" alt="image" src="http://blogs.technet.com/blogfiles/mikelag/WindowsLiveWriter/HowtoenableExchangeUserMonitortracingvia_7290/image_thumb_1.png" width="391" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;8. Run &lt;b&gt;stop_tracing.cmd &lt;/b&gt;to stop the tracing.&lt;/p&gt;  &lt;h2&gt;&lt;font color="#0080c0"&gt;Method 2&lt;/font&gt;&lt;/h2&gt;  &lt;h4&gt;Logman (Built in to the OS)&lt;/h4&gt;  &lt;p&gt;---------------&lt;/p&gt;  &lt;p&gt;1. Create a directory called Tracing (ex. C:\tracing)&lt;/p&gt;  &lt;p&gt;2. Create the trace log using the &amp;quot;Exchange Information Store&amp;quot; provider that Exmon tracing uses. The GUID or the name of the provider can be used as shown below.    &lt;br /&gt;logman create trace Exmon_Trace -p {2EACCEDF-8648-453e-9250-27F0069F71D2} -nb 3 25 -bs 3 -o c:\Tracing\&lt;/p&gt;  &lt;p&gt;logman create trace Exmon_Trace -p &amp;quot;Exchange Information Store&amp;quot; -nb 3 25 -bs 3 -o c:\Tracing\&lt;/p&gt;  &lt;p&gt;3. Create a &lt;b&gt;start_tracing.cmd&lt;/b&gt; file and add the following information to the file. Save this to the location created in Step 1.&lt;/p&gt;  &lt;p&gt;Logman start Exmon_Trace&lt;/p&gt;  &lt;p&gt;4. Create a &lt;b&gt;stop_tracing.cmd&lt;/b&gt; file and add the following information to the file. Save this to the location created in Step 2.     &lt;br /&gt;logman stop Exmon_Trace&lt;/p&gt;  &lt;p&gt;To create a schedule to start/stop these batch files at a particular time that you would like to specify, you could use the schtasks.exe command to do this. For more information on schtasks.exe syntax, follow the steps in &lt;a href="http://support.microsoft.com/?id=814596"&gt;http://support.microsoft.com/?id=814596&lt;/a&gt; .&lt;/p&gt;  &lt;p&gt;Mike&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3108970" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/mikelag/archive/tags/Performance/default.aspx">Performance</category><category domain="http://blogs.technet.com/mikelag/archive/tags/Tracing/default.aspx">Tracing</category><category domain="http://blogs.technet.com/mikelag/archive/tags/Tools/default.aspx">Tools</category></item></channel></rss>