다음을 통해 공유


Collect and View Windows Device Testing Framework (WDTF) Traces

Most device fundamentals reliability tests in Windows Hardware Certification Kit (Windows HCK) are written by using Windows Device Testing Framework (WDTF). It can be useful to collect and view WDTF traces when you troubleshoot device fundamentals test failures.

How to Collect WDTF Traces

To collect WDTF traces, you must perform the following steps:

Start a WDTF trace

You can start a WDTF trace collection by running the Diagnosability - Tracing Jobs - WDTF - Start WDTF trace collection optional job in Windows HCK.

Alternatively, you can start a WDTF trace collection from the command line, as shown in the following procedure.

To start a WDTF trace from the command line

  1. Open a command prompt by using administrative privileges.

  2. Type the following commands:

    logman create trace "autosession\WDTF" -p {6210f559-c7f7-4d2f-b674-4bc9315cecc7} 0xffffffff 0xff -o c:\WDTF_Traces\TraceFile.etl
    reg add HKLM\SYSTEM\CurrentControlSet\Control\WMI\Autologger\WDTF /v LogFileMode /t REG_DWORD /d 1 /f
    reg add HKLM\SYSTEM\CurrentControlSet\Control\WMI\Autologger\WDTF /v FileMax /t REG_DWORD /d 16 /f
    reg add HKLM\SYSTEM\CurrentControlSet\Control\WMI\Autologger\WDTF /v MaxFileSize /t REG_DWORD /d 0 /f
    
  3. Reboot the computer.

Note  

For more information about trace options, see Configuring and Starting an AutoLogger Session and Logman.

 

Stop Collecting Traces

You can stop a WDTF trace collection by running the Diagnosability - Tracing Jobs - WDTF - Stop WDTF trace collection job in Windows HCK.

Alternatively, you can stop a WDTF trace collection from the command line, as shown in the following procedure.

To stop a WDTF trace from the command line

  1. Open a command prompt by using administrative privileges.

  2. Type the following commands:

    logman -stop -ets WDTFlogman delete "autosession\WDTF"
    
  3. Reboot the computer.

Delete collected traces

Collected event trace log (.etl) files can be very large. We recommend that you copy them from the test system to another system for later analysis, and that you delete them from the test system. You can use the Diagnosability - Tracing Jobs - WDTF - Delete collected WDTF traces optional job in Windows HCK to delete collected WDTF traces.

How to View WDTF Traces

To view WDTF traces, you must first format the collected .etl files into text or comma-separated, variable-length (CSV) versions.

You can use Diagnosability - Install Jobs - Install tracing tools and Diagnosability - Tracing Jobs - WDTF - Format collected WDTF traces optional jobs in Windows HCK to create these files. The formatted traces are saved to the %systemdrive%\WDTF_Traces folder on the test system.

Alternatively, you can run Tracefmt from the command line to create the formatted log files:

To create formatted log files from the command line

  1. Open a command prompt by using administrative privileges.

  2. Type Tracefmt.exe –r https://msdl.microsoft.com/download/symbols <full path to ETL file> -o OutputTxtFile.txt

  3. Type Tracefmt.exe –r https://msdl.microsoft.com/download/symbols <full path to ETL file> -csv –o OutputCsvFile.csv

You can open CSV files in Microsoft® Excel; you can use the filtering features of Excel to filter collected traces, and to search for traces from certain time periods, from certain WDTF components, and other specific criteria.

Troubleshooting Device Fundamentals Reliability Testing by using the Windows HCK

 

 

Send comments about this topic to Microsoft