Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes how to use logman to collect event trace data for Microsoft Dynamics NAV Server. Logman (logman.exe) comes with the Windows Operating System. You can use it to create and manage event trace session and performance logs from the command prompt.
This article provides a brief introduction to using logman to collect trace event data for Microsoft Dynamics NAV Server and telemetry events. For more detailed information about logman, see Logman.
Collect event trace data
You can collect Microsoft Dynamics NAV Server trace event data from two different trace event providers: Microsoft-DynamicsNAV-Server and Microsoft-DynamicsNAV-Common. Microsoft-DynamicsNAV-Server is used for trace events like SQL traces, C/AL function traces, and session calls. Microsoft-DynamicsNAV-Common is used for telemetry events.
Data that is collected with logman is stored in a event trace log (.etl) file.
The following steps give you an example of how to use logman.
Open the command prompt, and change to the directory that contains the
logman.exefile.This is typically
C:\Windows\System32At the command prompt, run one of the following commands to create a trace data collector.
For telemetry trace events:
logman create trace MyTelemetryTraceData -p Microsoft-DynamicsNAV-Common -o c:\perflogs\MyTelemetryTraceData.etlFor server trace events:
logman create trace MyServerTraceData -p Microsoft-DynamicsNAV-Server -o c:\perflogs\MyServerTraceData.etlThese commands will create event log files named
MyTelemetryTraceData.etlandMyServerTraceData.etlin thec:\perflogsfolder of your computer.To start the trace session, run one of the following commands.
For telemetry trace events:
logman start MyTelemetryTraceDataFor server trace events:
logman start MyServerTraceDataTo stop the trace session, run one of the following commands.
For telemetry trace events:
logman stop MyTelemetryTraceDataFor server trace events:
logman stop MyServerTraceData
The data is now stored in an .elt file.
View trace event data
There are various industry tools available for viewing data in .etl files.
For example, from the command line, you can use the tracerpt command to create dump files, summary, and report files. The following code creates files for the MyTelemetryTraceData_000001.etl file:
tracerpt c:\perflogs\MyTelemetryTraceData_000001.etl -o c:\perflogs\MyTelemetry-dmp.xml -of XML -summary c:\perflogs\MyTelemetry-summary.txt -report c:\perflogs\MyTelemetry-rpt.xml
You can also use PerView. For more information, see How to: Use PerfView to View Event Trace Data.
See Also
Monitoring Microsoft Dynamics NAV Server Events
Microsoft Dynamics NAV Server Trace Events
Instrumenting an Application for Telemetry