Introduction
An ETL file is a trace recorded by Event Tracing for Windows (ETW), the tracing system
built into Windows. Parts of Windows,
drivers and applications act as providers that send events, and a trace session writes
the events of the providers it has enabled to an .etl file.
ETL files are made for performance analysis with the Windows Performance Recorder, for
diagnostics, and for network capture: netsh trace start capture=yes
records the packets crossing the network adapters into an ETL file. Windows also keeps
some of its own logs this way, such as the logs of Windows Update.
Structure
An ETL file is binary and is written as a series of fixed-size buffers, each filled with event records by the trace session and flushed to disk as it fills. The first event of the file holds the log file header, which describes the session. Each event starts with one of several event headers and carries the provider that sent it, an event ID, a timestamp, the process and thread, and the event’s data. The data is not self-describing: to decode it, a reader needs the provider’s manifest or other metadata, which tools such as Windows Performance Analyzer look up on the machine or in symbol files. Microsoft does not publish a full description of the file layout; these pages put together the structures it has published and what has been worked out from them.
Not described
Microsoft has not published the layout of an ETL file. These pages follow Microsoft’s documentation of the
structures it exposes and Geoff Chappell’s studies of NTWMI.H. The explorer has no ETL viewer.
Known, not yet covered
- Reference: the layout of extended data items in event headers rests on a third-party parser, and the numeric buffer flag and type values on Chappell’s pages.
- Viewer: there is no ETL plugin.
Unknown
- Reference: how buffers marked
ETW_BUFFER_FLAG_COMPRESSEDare compressed. - Reference: the layouts of
EVENT_INSTANCE_GUID_HEADERandMESSAGE_TRACE_HEADER, which event header type the first event uses, and most kernel hook IDs. - Reference: the meanings of buffer flag and type values beyond their names, and the offsets after the pointers in the log file header, which the page works out from the declaration.
Links
Software
- Windows Performance Recorder – records ETW traces to ETL files, part of the Windows Performance Toolkit (Windows)
- Windows Performance Analyzer – opens and charts ETL traces, part of the Windows Performance Toolkit (Windows)
- Event Viewer – built into Windows, opens saved ETL files (Windows)
- tracerpt – built into Windows, converts ETL files to XML or CSV (Windows)
- PerfView – Microsoft’s performance analysis tool, which opens ETL traces (Windows)
- etl2pcapng – converts the packets in a netsh trace to pcapng (Windows)
Developers
- TraceEvent – library from the PerfView project that reads ETL files (.NET)
Reference
- TRACE_LOGFILE_HEADER – Microsoft’s documentation of the header at the start of an ETL file
- WMI_BUFFER_HEADER – Geoff Chappell’s study of the buffer header and the event headers inside buffers