Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace

Page 1 of 10 123 ... LastLast
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace

    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace

    Getting Traces to Troubleshoot Performance Issues
    Published by
    Designer Media Ltd


    Microsoft has created a toolset called the Windows Performance Toolkit, or WPT, to help developers and users visualize and troubleshoot performance issues. One of the tools in this toolset is specifically designed to assist with capturing traces of boot, shutdown, or reboot cycles, and can provide insight into drivers, services, winlogon, explorer, disk and CPU utilization, and even help with seeing things like disk fragmentation and driver load order.


    Installing the tools

    Before gathering any data, you will first need to download the installation packages necessary to install the Windows Performance Toolkit on your Windows 7 machine. The Windows Performance Toolkit is a part of the Windows 7 SDK, but you won’t need to install the entire SDK to get the WPT installation files if you follow this guide. First, you need to download the Windows 7 SDK, which is a 500K web installer (click the “Install Now” link). Once you start the installation, you only need to check the “Windows Performance Toolkit” checkbox under the “Redistributable Packages” section – uncheck EVERYTHING else:

    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-sdk_perftoolkit.png

    After you click next, it will download (only) the installation .MSI packages needed to actually install the WPT. Once the download of the files is complete and you exit the SDK installer, you will need to actually install the version of the WPT that matches the architecture of your OS (the x86 MSI on a 32bit Windows 7 machine, the x64 MSI on a 64bit Windows 7 machine). The downloaded .MSI files will be located (by default) in C:\Program Files\Microsoft SDKs\Windows\v7.1\Redist\Windows Performance Toolkit:
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-sdk_perftoolkit_redist.png

    Install the correct installation file that matches the architecture (32bit or 64bit) of your Windows 7 install, taking all the default options and performing a “Complete” installation.


    Disable the Paging of the Kernel Executive on x64 Windows

    If you have a 64bit installation of Windows, you will need to modify the registry to enable full tracing to work properly. To do this, you will need to open an ELEVATED CMD PROMPT, then type "regedit.exe" from within that command prompt (minus the quotes of course). Once regedit is open, browse to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management, double-click the "DisablePagingExecutive" value, and change it from "0" to "1". Click "OK" to save the value:
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-disablepagingexecutive.png
    At this point, you *must* reboot for this change to take effect before you start ANY tracing.

    Once you've done the above steps, but before you continue, you will need to open an ELEVATED CMD PROMPT to execute any of the trace options described in this guide. Once you've decided which type of trace to take (or which you've been asked to take by a member of this forum), choose the correct trace section below and follow that section only:


    Creating a BOOT trace:

    First, you will need have that elevated CMD prompt open. Second, to generate a boot trace, you will need to type the following command into the CMD prompt, and press the ENTER key to execute it – note that this command is ALL ONE LINE:
    Code:
    xbootmgr –trace boot -traceFlags LATENCY+DISPATCHER+DISK_IO_INIT+NETWORKTRACE+MEMINFO+POWER+PERF_COUNTER+PRIORITY+REGISTRY+FILE_IO+FILE_IO_INIT -postBootDelay 300 -stackWalk Profile+ProcessCreate+CSwitch+ReadyThread+Mark+ThreadCreate+DiskReadInit+DiskWriteInit+DiskFlushInit+RegSetValue+RegCreateKey+RegSetInformation -resultPath C:\Boot_Trace
    This command will cause your machine to shut down and reboot automatically. Once the system restarts, please log back in (as necessary) as soon as possible to minimize the size of the resulting trace file. Once logged in, the system will present a dialog box letting you know that it is waiting 120 seconds (it will count down) before finishing the trace. DO NOT use your computer to do anything during this time – let the countdown finish and trace files generate:
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-boot.png
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-capture_finish.png

    Once the trace is complete, you will find a large .ETL file and a log file in C:\Boot_Trace. This .ETL file can then be compressed (using 7zip, winrar, winzip, etc.) and uploaded for analysis - however, due to its size, you will need to upload it to a third-party site such as MediaFire, MegaUpload or RapidShare.


    Creating a Shutdown trace:

    First, you will need have that elevated CMD prompt open. Second, to generate a boot trace, you will need to type the following command into the CMD prompt, and press the ENTER key to execute it – note that this command is ALL ONE LINE:
    Code:
    xbootmgr –trace shutdown -traceFlags BASE+LATENCY+DISK_IO_INIT+DISPATCHER+DRIVERS+FILE_IO+FILE_IO_INIT+NETWORKTRACE+PERF_COUNTER+POWER+PRIORITY+REGISTRY -resultPath C:\Shutdown_Trace
    This command will cause your machine to shut down and reboot automatically. Once the system restarts, please log back in (as necessary) as soon as possible. Once logged in, the system will present a dialog box letting you know that it is waiting 120 seconds (it will count down) before rebooting your machine A SECOND TIME. DO NOT click the countdown dialog, or in any other way utilize your computer to do anything during this time – let the countdown finish and the system restart:
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-shutdown.png

    Again, once the system restarts a second time, please log back in (as necessary) as soon as possible. This time, the trace will finalize:
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-capture_finish.png

    Once the trace is complete, you will find a large .ETL file and a log file in C:\Shutdown_Trace. This .ETL file can then be compressed (using 7zip, winrar, winzip, etc.) and uploaded for analysis - however, due to its size, you will need to upload it to a third-party site such as MediaFire, MegaUpload or RapidShare.


    Creating a REBOOT trace:

    First, you will need have that elevated CMD prompt open. Second, to generate a boot trace, you will need to type the following command into the CMD prompt, and press the ENTER key to execute it – note that this command is ALL ONE LINE:
    Code:
    xbootmgr –trace rebootCycle -traceFlags BASE+LATENCY+DISK_IO_INIT+DISPATCHER+DRIVERS+FILE_IO+FILE_IO_INIT+NETWORKTRACE+PERF_COUNTER+POWER+PRIORITY+REGISTRY -resultPath C:\Reboot_Trace
    This command will cause your machine to shut down and reboot automatically. Once the system restarts, please log back in (as necessary) as soon as possible. Once logged in, the system will present a dialog box letting you know that it is waiting 120 seconds (it will count down) before rebooting your machine A SECOND TIME. DO NOT click the countdown dialog, or in any other way utilize your computer to do anything during this time – let the countdown finish and the system restart:
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-reboot.png

    Again, once the system restarts a second time, please log back in (as necessary) as soon as possible. This will start another 120 second countdown, and reboot your machine A THIRD TIME. As before, DO NOT utilize your computer during this time – let the countdown finish (again) and the system restart (again):


    Once the system restarts a third time, please log back in (as necessary) as soon as possible. This time, the trace will finalize:
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-capture_finish.png

    Once the trace is complete, you will find a large .ETL file and a log file in C:\Reboot_Trace. This .ETL file can then be compressed (using 7zip, winrar, winzip, etc.) and uploaded for analysis - however, due to its size, you will need to upload it to a third-party site such as MediaFire, MegaUpload or RapidShare.



  1. mjf
    Posts : 5,969
    Windows 7x64 Home Premium SP1
       #1

    Good stuff I was hoping you'd make a tutorial
      My Computer


  2. Posts : 10,200
    MS Windows 7 Ultimate SP1 64-bit
       #2

    Glad to see a tutorial on this.

    I've been reluctant to recommend xperf because of lack of tutorial and also because for the non-serious user I have feared that there would be more problems and situations created than solved.

    I do feel like the tool is good for the knowledgeable user.

    Thanks again for the tutorial.
      My Computer


  3. Posts : 12,177
    Windows 7 Ult x64 - SP1/ Windows 8 Pro x64
       #3

    Nice tutorial, thanks for taking the time to write this.
      My Computer


  4. Posts : 8,679
    Windows 10 Pro x64
       #4

    Good job !
      My Computer

  5.    #5

    Fantastic! I didn't know you'd put it into a SF format, having seen just the one on your blog.

    You are the top expert I've found on this and we are very lucky to have you here.
      My Computer


  6. Posts : 24,479
    Windows 7 Ultimate X64 SP1
       #6

    If I need to find out why my PC is taking 187 seconds instead of the former ~66, do I need all three traces? Which forum do you want them in?
    Installed the Windows Performance Toolkit per the tutorial and when booting up the first time I was presented with this BSOD right after the Windows boot animation finished.
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-bsod-sdks.jpg
    I got another at the second boot up about USB_BUGCHECK I believe was the error message. The third time no error message in the BSOD.
    Last edited by Britton30; 15 Aug 2011 at 01:14.
      My Computer


  7. Posts : 59
    7 professional
       #7

    Hi. I am doing a clean install with Gregrockers guidance and help. I was going through the event logs and found boot delay, standby degradation, delays caused by usb stick, sleep and hibernation errors. It all seems to point to bios yet Greg refered me to you first. I have a Mutt Mobo from Hp which does not support Win7 drivers for my system. So it does make me nervous to flash bios with a Universal driver for Amd that I found.

    I installed tool and ran all three traces. Boot trace delays 300 seconds (did it twice) 216Mb. Reboot trace ask for elevated permission before each 120 sec delay (did it three times... one time it quit trace due to an error) 241Mb.
    Shutdown trace 28Mb.

    However I did not leave in USB stick when doing trace.....which was causing part of the delay errors.

    I will greatly appreciate any help. Yet, do help Britton first..... he is definitely priority. Just let me know if I need to redo traces w/stick plugged in.
    Thanks.
      My Computer


  8. Posts : 2,528
    Windows 10 Pro x64
    Thread Starter
       #8

    Britton30 said:
    If I need to find out why my PC is taking 187 seconds instead of the former ~66, do I need all three traces? Which forum do you want them in?
    You would want just a boot trace. As to the BSOD, sometimes the +DRIVERS portion of the command line can cause it. If you get frequent BSODs when attempting to trace, remove "+DRIVERS" from the command line for a trace and that should avoid a BSOD when taking a trace.

    ariel5345 said:
    I installed tool and ran all three traces. Boot trace delays 300 seconds (did it twice) 216Mb. Reboot trace ask for elevated permission before each 120 sec delay (did it three times... one time it quit trace due to an error) 241Mb.
    Shutdown trace 28Mb.

    However I did not leave in USB stick when doing trace.....which was causing part of the delay errors.

    I will greatly appreciate any help. Yet, do help Britton first..... he is definitely priority. Just let me know if I need to redo traces w/stick plugged in.
    Thanks.
    You only need a boot trace, unless you want to get info on the others. I would recommend, if a USB key causes additional delays, that you take a boot trace with a USB key in.


    If you need help with traces, create a thread in the performance section and point me to it.
      My Computer


  9. Posts : 24,479
    Windows 7 Ultimate X64 SP1
       #9

    Ok thanks Cluberti, will do and let you know. :)
    BTW, I did mean to say reboot in relation to those times.
    Now I can't start the trace
    Gathering a Startup, Shutdown, Sleep, Hibernate, or Reboot Trace-cmd-trace.jpg
      My Computer


 
Page 1 of 10 123 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:54.
Find Us