ETW session close RRS feed

  • Question

  • Hi everyone,

    I'm trying to close ETW active session before starting it on .NET framework 3.5. I'm using "TraceEventSession.GetActiveSession("session name").Dispose()" Microsoft API

    but it seems like it's closing session successfully but then when I'm trying to start again seems like it never starts. Can anyone help me where I'm doing wrong?



    Friday, April 20, 2018 2:43 PM


  • Hi Rajat Kinkhabwala,

    Thank you for posting here.

    For your question, if you want to stop tracing session, you could try the ways below.

    1. Stop session via command
    logman stop mysession

    2. Decode log file
    tracerpt c:\logs\mylog_000001.etl

    If you want to start tracing session, you could try the ways below.

    1. Pre-create logging directory, such as c:\logs
    2. On Vista or Server 2008, open elevated command window and type:

    logman create trace mysession -o c:\logs\mylog -p "{A11a0820-c24b-428c-83e2-26b41091702e}"
    where the GUID is the same you have in the code line
    private static Guid providerId.
    Other (red) parts of the command are arbitrary names.

    3.  Start tracing session using the command (for example):
    logman start mysession

    For more details, you could refer to the link below.


    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, April 24, 2018 5:43 AM