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

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:

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:
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:
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:
boot.png
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:
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:
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:
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):
reboot_2.png


Once the system restarts a third time, please log back in (as necessary) as soon as possible. This time, the trace will finalize:
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.
 

Attachments

  • capture_finish (1).png
    capture_finish (1).png
    3.8 KB · Views: 1
  • capture_finish (2).png
    capture_finish (2).png
    3.8 KB · Views: 1
  • reboot_2.png
    reboot_2.png
    1.5 KB · Views: 1
Last edited by a moderator:
Hmmmmm - do you have .net4 installed on your machine perchance?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Hmmm. The only thing I've ever seen fail is a bum download, which is indeed a bit of a pain to get a fix from. I can provide the installation file itself, if you tell me whether you need x86 or x64.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Sorry, been at a location I couldn't FTP from. I've PM'ed you the link.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Thanks, I'm doing the trace now.
K, trace is done. Yup, I think it was a bum download. The trace completed successfully.
I will upload them and send you the link soon.
Thanks
 
Last edited:

My Computer My Computer

OS
N/A
Please post this in a new thread under perf/maintenance - I like to keep this one's responses to a minimum if possible. Thank you!
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Oh, and what setting would you recommend for the registry entry "DisablePagingExecutive" that you told to disable in the tutorial?
 

My Computer My Computer

OS
N/A
For taking a trace, disablepagingexecutive must be set to 1. as per the tutorial. Once you're done, you can set it back to what it was (0) if you desire. Note you do get slightly better performance with it set to 1, but you also have a very miniscule, but still potential, risk of a BSOD if you run out of kernel paged pool memory and (with this value set to 1) the OS cannot page certain Windows kernel components to the paging file.

I personally run my machines with disablepagingexecutive set to 1 as a rule, but I'm willing to take a (very, very small) risk on my own machines. On production systems or servers, however, I don't leave this set to 1 for obvious reasons - risk aversion.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
Hi cluberti, Very helpful tutorial, thanks! I easily found the cause of a very slow shutdown.

I came to check out what to do about disablepagingexecutive and found that you had already answered my question!

Does the WPT in Windows Software Development Kit (SDK) for Windows 8 superceed the one you talk about in this tutorial? I had previously installed the debugging tool from it, but have WPT from SDK 7. Will this cause any problems?

Thanks
 

My Computer My Computer

OS
Windows 7 Pro x64
No, actually the tools from the Windows 8 ADK supersede the tools from the Win7 SDK, although the same commands still work.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
No, actually the tools from the Windows 8 ADK supersede the tools from the Win7 SDK, although the same commands still work.

Hi Cluberti,

I'm trying to install the performance tools from Win8 SDK and keep getting an error. I had earlier installed the debugger from it, but it seems to be missing - This is the error log from the installation (I've tried it many time, so I don't think it is a network problem).

Thanks for any advice. I've attache the install error log.
 

Attachments

My Computer My Computer

OS
Windows 7 Pro x64
It's actually the usual failure when it can't validate the hash of the MSI in the downloadable package. I used to get this a lot when downloading on my cable connection (because time warner frankly stinks), but I re-downloaded again from a more reliable connection and had no issues with it afterwards.

My guess is that your download is simply not complete, and at least the WPT packages are corrupt in some way.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
I have tried three times to install the Windows SDK toolkit, but each time it fails to install correctly. What is going wrong? I am trying to resolve a problem with Windows 7 64 not shutting down.
 

My Computer My Computer

OS
windows 7 home premium 64
CPU
Intel core i5 2500 4x3.3GHz LGA 1155 6MB cache
Motherboard
Gigabyte GA-Z68X-UD3H-B3
Memory
2 Kingston 4GB 1333MHz DDR3 NON ECC
Graphics Card(s)
none
Sound Card
none
Monitor(s) Displays
LG Flatron W2252TQ
Hard Drives
"C" OCZ VERTEX 3 120GB SATA III 2.5"
WD 1TB SATA III 3.5"64MB Caviar Green Intellipower
PSU
Coolermaster 500W
Case
Coolermaster Elite 431P
Cooling
-
I still cannot instal the SDK setup. It keeps failing. I have enclosed the error message and log files. Trying to determine why Windows 7-64 will not shutdown.snip1.PNG

View attachment SDKSetup_7.0.6918.0.log.zip. Can someone help me please? Golden: you too are in Adelaide. Pls help your compatriot.
 

My Computer My Computer

OS
windows 7 home premium 64
CPU
Intel core i5 2500 4x3.3GHz LGA 1155 6MB cache
Motherboard
Gigabyte GA-Z68X-UD3H-B3
Memory
2 Kingston 4GB 1333MHz DDR3 NON ECC
Graphics Card(s)
none
Sound Card
none
Monitor(s) Displays
LG Flatron W2252TQ
Hard Drives
"C" OCZ VERTEX 3 120GB SATA III 2.5"
WD 1TB SATA III 3.5"64MB Caviar Green Intellipower
PSU
Coolermaster 500W
Case
Coolermaster Elite 431P
Cooling
-
Hmmmmm - let me see if I can get creative with you. Give me a few days to see what I can do.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 10 Pro x64
CPU
Intel Core i7 4790K @ 4.5GHz
Motherboard
Asus Maximus Hero VII
Memory
32GB DDR3
Graphics Card(s)
Nvidia GeForce GTX970
Sound Card
Realtek HD Audio
Screen Resolution
1920x1200
Hard Drives
1x Samsung 250GB SSD
4x WD RE 2TB (RAIDZ)
PSU
Corsair AX760i
Case
Fractal Design Define R4
Cooling
Noctua NH-D15
cluberti!

Hi. Have you had any ideas? I still cannot get the thing to instal.
 

My Computer My Computer

OS
windows 7 home premium 64
CPU
Intel core i5 2500 4x3.3GHz LGA 1155 6MB cache
Motherboard
Gigabyte GA-Z68X-UD3H-B3
Memory
2 Kingston 4GB 1333MHz DDR3 NON ECC
Graphics Card(s)
none
Sound Card
none
Monitor(s) Displays
LG Flatron W2252TQ
Hard Drives
"C" OCZ VERTEX 3 120GB SATA III 2.5"
WD 1TB SATA III 3.5"64MB Caviar Green Intellipower
PSU
Coolermaster 500W
Case
Coolermaster Elite 431P
Cooling
-
Back
Top