Questions tagged [etw]

Event Tracing for Windows (ETW) is a high-speed tracing facility provided by the Windows Operating System which was first introduced in Windows 2000.

Event Tracing for Windows (ETW) is a general-purpose, high-speed tracing facility provided by the Windows operating system. Using a buffering and logging mechanism implemented in the kernel, ETW provides a tracing mechanism for events raised by both user-mode applications and kernel-mode device drivers.

Additionally, ETW gives you the ability to enable and disable logging dynamically, making it easy to perform detailed tracing in production environments without requiring reboots or application restarts. The logging mechanism uses per-processor buffers that are written to disk by an asynchronous writer thread. This allows large-scale server applications to write events with minimum disturbance.

ETW is the core tracing facility in Windows on top of which both the Event Log and WPP are built.

ETW was first introduced on Windows 2000. Since then, various core OS and server components have adopted ETW to instrument their activities, and it's now one of the key instrumentation technologies on Windows platforms.

On Windows Vista, ETW has gone through a major upgrade, and one of the most significant changes is the introduction of the unified event provider model and APIs. In short, the new unified APIs combine logging traces and writing to the Event Viewer into one consistent, easy-to-use mechanism for event providers. At the same time, several new features have been added to improve developer and end user experience.

445 questions
2
votes
2 answers

Windows ETW: StartTrace failing with error 87 (ERROR_INVALID_PARAMETER)

i'm calling the Event Tracing for Windows StartTrace function: StartTrace(sessionHandle, KERNEL_LOGGER_NAME, sessionProperties); It is failing with error code 87 (ERROR_INVALID_PARAMETER). The MSDN gives some common causes for this…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
2
votes
0 answers

Create Custom Log in Event Viewer with C++

I want to be able to create a custom log in event viewer (i.e. to create a custom node under "Application and Services Logs" in windows event viewer) It is an easy task, if you use EventLog.CreateEventSource method: LINK Its problem is that this…
RezaPlusPlus
  • 545
  • 1
  • 8
  • 18
2
votes
0 answers

ETW lost events

I am using ETW to get some Microsoft pre-defined events. I set the EVENT_TRACE_PROPERTIE as follow: TraceProperties->LogFileMode = EVENT_TRACE_REAL_TIME_MODE; TraceProperties->MaximumFileSize = 100; // Limit file size to 100MB…
Q_7iu
  • 21
  • 2
2
votes
0 answers

How do I add spaces to folder names being created in Event Viewer > Application and Services logs?

Currently, I'm using EventSourceAttribute to create a hierarchy of subfolders in Application and Services log in Event Viewer. This is my code [EventSource(Name = "Service-MacClient-EventSource")] public sealed class MinimalEventSource :…
John Evans Solachuk
  • 1,953
  • 5
  • 31
  • 67
2
votes
1 answer

Event Tracing for Windows: OpenTrace/ProcessTrace not returning any events - callback not being called

Short Version I'm trying to use OpenTrace and ProcessTrace to read the events of a .etl file. the call to OpenTrace successfully returns a TRACEHANDLE the call to ProcessTrace returns ERROR_SUCCESS but ProcessTrace never calls my EVENT_CALLBACK…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
2
votes
2 answers

Is there an ETW provider for Windows Mixed Reality events?

My goal is to include VR specific events in an ETL capture file to be able to analyze some performance issues. There are custom providers for Oculus and SteamVR runtimes, but I could not find any documentation about ETW events produced by WMR…
morallo
  • 329
  • 4
  • 9
2
votes
0 answers

SSL Cipher Suite version from HTTP ETW logs

I am trying to set up HTTP.SYS ETW traces from Event Tracing in HTTP.sys to capture the TLS/Cipher Suites data for my web server. When I look at the CSV or XML traces, I see a bunch of events related to the SSL handshake: However, I don't find…
Shubham Sharma
  • 714
  • 1
  • 8
  • 18
2
votes
3 answers

Cannot find output of Win32 TraceLogging

I tried to replicate the short sample program for TraceLogging that Microsoft provides (see below, with minor changes). I completed the "development" (rather copy) in Visual Studio 2019. All is fine, compiles without issues, runs without issues, but…
2
votes
1 answer

In Event Tracing for Windows (ETW), TraceEventSession don't catch read event from notepad

I use hits filters: session.EnableKernelProvider(KernelTraceEventParser.Keywords.DiskFileIO | KernelTraceEventParser.Keywords.FileIOInit | …
iluxa1810
  • 278
  • 3
  • 12
2
votes
0 answers

How to disable stacks for EventSource events?

Using .Net Core 3.1 I've implemented my event source like this: [EventSource(Name = "RequestStatistics-Events")] public sealed class RequestEventsProvider : EventSource { public RequestEventsProvider() : base(throwOnEventWriteErrors: false) …
bss
  • 31
  • 3
2
votes
1 answer

Access user data associated with event provided using TraceLoggingWrite

I am able to generate tracelogging events from my application(able to view them in Windows Performance Analyzer) using this method. The event emitted is as follows HRESULT CTracelogger::PublishEvent(void *pData) { if (pData) { …
handle1605
  • 89
  • 1
  • 9
2
votes
0 answers

OSError: [WinError 1450] Insufficient system resources exist to complete the requested service - when running PyWinTrace (python-based ETW solution)

I'm trying to run a Python script based on Pywintrace by FireEye which is a python-based Event Tracing for Windows (ETW) solution. It allows you to specify ETW providers and keywords in order to get real-time output of Windows events printed to your…
anapereira
  • 21
  • 2
2
votes
1 answer

Change of behavior of tracewpp between versions 10.0.15063.0 and 10.0.17134.0 of Windows SDK

I have an application relying on user mode tracing via wpp framework. However, Microsoft introduced some changes in the couple of latest version of Windows SDK which broke the tracewpp.exe tool somehow. The actual problem I'm seeing looks as…
2
votes
0 answers

Why ETW logging logs 2 second later

I'm using ETW logging. Here is my codes : [EventSource(Name = "MyEventSource")] public sealed class MyEventSource : EventSource { public static MyEventSource Log { get; set; } = new MyEventSource(); [NonEvent] public void Register() …
Dilshod K
  • 2,924
  • 1
  • 13
  • 46
2
votes
1 answer

Publisher MyTestSource resources could not be found or are not accessible to the EventLog service account (NT SERVICE\EventLog)

I'm trying register EventSource using Microsoft.Diagnostics.Tracing.EventRegister from nuget. I rebuild my project and its generates manifest. After that I run cmd by admin and execute this command: wevtutil.exe im "ETW…
Dilshod K
  • 2,924
  • 1
  • 13
  • 46