'Microsoft-SemanticLogging-Etw' already exists How do I delete the session

Topics: Semantic Logging Application Block
Jun 14, 2013 at 3:08 PM
I am using the SematicLogging-svc on my Dev PC in console mode. Occasionally, when I run up the SematicLogging-svc in the console I get the error message: 'Microsoft-SemanticLogging-Etw' already exists. Delete the session....

I am pretty sure it's my fault for not ending the session correctly by just closing the console window without hitting the enter key first, however, the only way out I have at the moment is to re-boot my dev PC.

Is there a way of deleting the sessions that are orphaned by my bad habit of closing the console window without hitting enter first. I know I should close the session in the console correctly, but I am curious as to an alternative, since EWT is baked into the OS, I am guessing there are some commands I can use to list sessions and perhaps delete them?
Jun 14, 2013 at 4:41 PM
Edited Jun 14, 2013 at 4:42 PM
Here is a pretty easy way:
  • Open up Computer Managment (compmgmt.msc) as Administrator
  • Navigate to System Tools->Performance->Data Collector Sets->Event Trace Sessions
  • You should see an entry with a name similar to: Microsoft-SemanticLogging-Etw (e.g. Microsoft-SemanticLogging-Etw-svcRuntime is the value based on the supplied default config file)
  • Stop the Microsoft-SemanticLogging-Etw session(s) (right click on entry and click Stop or click stop button
  • Once stopped, the session can be deleted
Here's a stock image of what the UI looks like:


Randy Levy
Enterprise Library support engineer
Support How-to
Jun 14, 2013 at 7:27 PM

Randy is right regarding the "manual" removal of the sessions. However, notice that you might be using an old version (CTP) because the current drop will silently remove any "zombie" session and recreate a fresh one. You will notice this because a message will be logged to the console or Event log in case of a service instance informing the removal of each session according to your configured sinks.

Jun 14, 2013 at 7:32 PM
Awesome. Thanks.

I have to say: I Hope they pay you well, as you guy's are so on it. Thank you.
Jun 14, 2013 at 7:39 PM
Hernan is also right. :) The CTP would throw an error if there was a previous active session. The RTM version now stops the pre-existing session.

If the session exists when starting the service you should now see a message like this:
EventId : 802, Level : Informational, Message : The trace session with the name 'Microsoft-SemanticLogging-Etw-svcRuntime' was removed., Payload : [sessionName : Microsoft-SemanticLogging-Etw-svcRuntime] , EventName : TraceEventServiceSessionRemovedInfo, Timestamp : 2013-06-14T16:35:15.7406706Z
Randy Levy
Enterprise Library support engineer
Support How-to