Share via


Enabling Tracing

When called in the context of a managed code response, the Microsoft.EnterpriseManagement.Mom.Runtime.Context.Echo method sends text messages to a log file. In script responses, the equivalent method is ScriptContext.Echo.

Tracing is useful for recording the sequence of steps completed by the code in the script or assembly. The log file is easily examined in a text editor to verify that the response was called, and that it followed the expected code execution path. If the assembly or script does not load, or stops running, the buffered output from the Echo method might not be written to the log file. For diagnosing serious problems, a debugger should be used instead.

Tracing is enabled through the Windows registry. If the assembly or script runs on the Management Server, enable tracing on the Management Server computer. For assemblies and scripts that run on agent-managed computers, enable tracing on each agent-managed computer you need to examine.

On agent-managed computers, the log file is created in the system's %TEMP%\Microsoft Operations Manager folder, and it is named using the following format:

AgentResponses-GroupName.log

This file stores output from responses that are configured to run on the agent computer. GroupName is the name of the management group that contains the rule and response script. For multi-homed agents, a separate log file is created for each management group it belongs to.

On a Management Server computer, an additional log file is created in the system's %TEMP%\Microsoft Operations Manager folder:

ServerResponses-GroupName.log

This file stores output from responses that are configured to run on the Management Server.

To turn on tracing:

  1. Run Windows Registry Editor (Regedit.exe).
  2. Browse to the HKEY_LOCAL_MACHINE\SOFTWARE\Mission Critical Software\OnePoint registry key.
  3. If EnableActiveDebugging does not already exist, create a new DWORD entry for it. Set the value of the EnableActiveDebugging entry to 1.
  4. Tracing will begin the next time the MOM service starts. You can restart the service immediately, or wait until the next scheduled restart.

To disable tracing, change EnableActiveDebugging to 0. The new settings will take effect the next time the MOM service starts.

Note Note   

Disable tracing after you have finished troubleshooting the problem. Enabling debugging and tracing will decrease performance and other users could attach debuggers to the MOMHost.exe process and lock threads for extended periods of time.

See Also

Enabling Script Debugging | Microsoft.EnterpriseManagement.Mom.Runtime.Context.Echo method | ScriptContext.Echo method