329 lines
15 KiB
HTML
329 lines
15 KiB
HTML
<html>
|
||
|
||
<head>
|
||
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
|
||
<meta name=Generator content="Microsoft Word 10 (filtered)">
|
||
<title>Creating Trace Log Sessions</title>
|
||
|
||
<style>
|
||
<!--
|
||
/* Font Definitions */
|
||
@font-face
|
||
{font-family:Verdana;
|
||
panose-1:2 11 6 4 3 5 4 4 2 4;}
|
||
@font-face
|
||
{font-family:"MS Sans Serif";
|
||
panose-1:0 0 0 0 0 0 0 0 0 0;}
|
||
/* Style Definitions */
|
||
p.MsoNormal, li.MsoNormal, div.MsoNormal
|
||
{margin:0in;
|
||
margin-bottom:.0001pt;
|
||
font-size:12.0pt;
|
||
font-family:"Times New Roman";}
|
||
h1
|
||
{margin-top:12.0pt;
|
||
margin-right:0in;
|
||
margin-bottom:3.0pt;
|
||
margin-left:0in;
|
||
page-break-after:avoid;
|
||
font-size:16.0pt;
|
||
font-family:Arial;
|
||
font-weight:bold;}
|
||
h3
|
||
{margin-right:0in;
|
||
margin-left:0in;
|
||
font-size:13.5pt;
|
||
font-family:"Times New Roman";
|
||
font-weight:bold;}
|
||
h4
|
||
{margin-top:12.0pt;
|
||
margin-right:0in;
|
||
margin-bottom:3.0pt;
|
||
margin-left:0in;
|
||
page-break-after:avoid;
|
||
font-size:14.0pt;
|
||
font-family:"Times New Roman";
|
||
font-weight:bold;}
|
||
a:link, span.MsoHyperlink
|
||
{color:blue;
|
||
text-decoration:underline;}
|
||
a:visited, span.MsoHyperlinkFollowed
|
||
{color:blue;
|
||
text-decoration:underline;}
|
||
p
|
||
{margin-right:0in;
|
||
margin-left:0in;
|
||
font-size:12.0pt;
|
||
font-family:"Times New Roman";}
|
||
@page Section1
|
||
{size:8.5in 11.0in;
|
||
margin:1.0in 1.25in 1.0in 1.25in;}
|
||
div.Section1
|
||
{page:Section1;}
|
||
-->
|
||
</style>
|
||
|
||
</head>
|
||
|
||
<body lang=EN-US link=blue vlink=blue>
|
||
|
||
<div class=Section1>
|
||
|
||
<h1><span style='font-size:24.0pt;font-family:"Times New Roman"'>Creating New
|
||
Trace Log Sessions</span></h1>
|
||
|
||
<h4><span style='font-size:12.0pt'>Using TraceView To Create A New Log Session</span></h4>
|
||
|
||
<p style='margin-bottom:12.0pt'>TraceView can be started by running it from the
|
||
command-line with no options, or double clicking its icon in Windows Explorer.
|
||
A new trace logging session may be started by selecting "File"
|
||
and then "Create New Log Session". Alternatively, right
|
||
clicking any blank area of the Log Session window causes a pop-up menu to
|
||
appear from which appropriate action can be selected.</p>
|
||
|
||
<p style='margin-bottom:12.0pt'><br>
|
||
<img width=852 height=187 src="CreatingNewTraceLogSessions_files/image001.jpg"></p>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'><br>
|
||
Selecting <20>Create New Log Session<6F> pops up the </span><span style='font-size:
|
||
12.0pt'>Create New Log Session</span><span style='font-size:12.0pt;font-weight:
|
||
normal'> window. This window lists all the providers that are active for
|
||
this log session by PDB file name, CTL file name, Kernel Logger name, or
|
||
control GUID, depending on how the control information is provided. Since
|
||
no trace providers have been defined yet, the Provider List is initially empty.</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt'><img width=441 height=362
|
||
src="CreatingNewTraceLogSessions_files/image002.jpg"></span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'><br>
|
||
To add a trace provider, click the </span><span style='font-size:12.0pt'>Add
|
||
Provider </span><span style='font-size:12.0pt;font-weight:normal'>button to
|
||
launch the </span><span style='font-size:12.0pt'>Provider Control GUID Setup</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> dialog:</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt;font-weight:normal'><img width=413
|
||
height=442 src="CreatingNewTraceLogSessions_files/image003.jpg"></span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt;font-weight:normal'> </span><span
|
||
style='font-size:12.0pt'><br>
|
||
</span><span style='font-size:12.0pt;font-weight:normal'>There are four
|
||
possible way to identify a trace provider to TraceView:</span></h3>
|
||
|
||
<h3 style='margin-left:.5in;text-indent:-.25in'><span style='font-size:12.0pt;
|
||
font-weight:normal'>1. Identify a PDB file associated with
|
||
the trace provider. For example, when building a driver that includes
|
||
support for ETW, the created PDB file contains both the Control and Format GUID
|
||
information used by the driver. Identifying the PDB file associated with
|
||
a trace provider is the quickest and easiest way to get started with tracing.</span></h3>
|
||
|
||
<h3 style='margin-left:.5in;text-indent:-.25in'><span style='font-size:12.0pt;
|
||
font-weight:normal'>2. Identify a GUID control file (by
|
||
convention, file type .CTL), which is a text file containing the control
|
||
GUID. This is the same .CTL file type that may be familiar from using the
|
||
TraceLog command-line utility.</span></h3>
|
||
|
||
<h3 style='margin-left:.5in;text-indent:-.25in'><span style='font-size:12.0pt;
|
||
font-weight:normal'>3. Manually enter (or paste) the control
|
||
GUID into the space provided by TraceView in the format:
|
||
00000000-0000-0000-0000-000000000000.</span></h3>
|
||
|
||
<h3 style='margin-left:.5in;text-indent:-.25in'><span style='font-size:12.0pt;
|
||
font-weight:normal'>4. The NT Kernel Logger can be selected
|
||
as a provider and the Kernel Logger control information will be used
|
||
automatically.</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'>The method used to identify the trace provider is selected by clicking
|
||
on the appropriate radio button in the dialog above. If the PDB File or
|
||
CTL File method is selected, the file name and path information may be entered
|
||
manually or the browse button (the button with <20><><EFBFBD> to the right of the edit box
|
||
for the file name) may be used to browse for the correct file. For
|
||
example, clicking the <20><><EFBFBD> browse button to the right of the PDB file edit box,
|
||
brings up the following dialog, which has been used to selected the file tracedrv.pdb:</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt'><img width=428 height=273
|
||
src="CreatingNewTraceLogSessions_files/image004.jpg"></span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'><br>
|
||
Clicking <20>Open<65> in the Open PDB File dialog opens the indicated file and
|
||
returns to the </span><span style='font-size:12.0pt'>Provider Control GUID Setup</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> dialog:</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'><img width=413
|
||
height=442 src="CreatingNewTraceLogSessions_files/image005.jpg"></span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'><br>
|
||
Clicking <20>OK<4F> in the </span><span style='font-size:12.0pt'>Provider Control
|
||
GUID Setup</span><span style='font-size:12.0pt;font-weight:normal'> dialog
|
||
returns to the </span><span style='font-size:12.0pt'>Log Session Providers
|
||
Dialog</span><span style='font-size:12.0pt;font-weight:normal'>. The name
|
||
of the PDB file has now been filled into the Provider List indicating a
|
||
provider has been supplied.</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt;font-weight:normal'><img width=441
|
||
height=362 src="CreatingNewTraceLogSessions_files/image006.jpg"></span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt;font-weight:normal'><br>
|
||
At this point, additional providers may be added to this log session by
|
||
clicking <20>Add Provider<65> again and following the procedures above.</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'>When all providers have been identified, the <20>Next<78> button is selected
|
||
to display the </span><span style='font-size:12.0pt'>Log Session Options</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> pane of the </span><span
|
||
style='font-size:12.0pt'>Create New Log Session</span><span style='font-size:
|
||
12.0pt;font-weight:normal'> dialog:</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt'><img width=441 height=362
|
||
src="CreatingNewTraceLogSessions_files/image007.jpg"></span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt;font-weight:normal'><br>
|
||
The </span><span style='font-size:12.0pt'>Log Session Options</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> pane allows the user to define
|
||
whether the trace log session will generate real-time output, or whether data
|
||
will be logged to a trace log data (.etl) file, or both. The name of the
|
||
binary log file may be changed or browsed for from this dialog. A unique
|
||
name for the log session may be provided as well. Default names for both
|
||
the log file and log session are provided as shown. </span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'>Trace log listing and summary output files can also be generated by
|
||
TraceView. These files are identical to those generated by the
|
||
TraceFmt command-line utility. Control of the generation of these files,
|
||
and setting of their names, is accomplished by clicking on the <20></span><span
|
||
style='font-size:12.0pt'>Advanced Log Session Options</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> >><EFBFBD> button. </span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt'><img width=433 height=361
|
||
src="CreatingNewTraceLogSessions_files/image008.jpg"></span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'><br>
|
||
The default log session options can be changed by clicking on the <20></span><span
|
||
style='font-size:12.0pt'>Advanced Log Session Options</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> >><EFBFBD> button and selecting the
|
||
</span><span style='font-size:12.0pt'>Log Session Parameter Options</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> tab of the </span><span
|
||
style='font-size:12.0pt'>Advanced Log Session Options</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> dialog:</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'><img width=433 height=361
|
||
src="CreatingNewTraceLogSessions_files/image009.jpg"></span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt;font-weight:normal'><br>
|
||
Grayed out items cannot be modified, but parameters listed with dark text may
|
||
have their values altered. Some parameters are exclusive of others, so
|
||
providing values for certain parameters may clear or alter the values of
|
||
others. Clicking on the <20>OK<4F> button exits the </span><span
|
||
style='font-size:12.0pt'>Advanced Log Session Options</span><span
|
||
style='font-size:12.0pt;font-weight:normal'> dialog. </span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'>Clicking on the <20>Finish<73> button back in the </span><span
|
||
style='font-size:12.0pt'>Create New Log Session</span><span style='font-size:
|
||
12.0pt;font-weight:normal'> dialog exits the dialog. TraceView displays
|
||
information about the newly created log session in the Log Session Window (the
|
||
top window pane in the screen shot below), and an empty (until trace event are
|
||
picked up) Log Session Output Display Window (the bottom pane):</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt'><img width=895 height=306
|
||
src="CreatingNewTraceLogSessions_files/image010.jpg"></span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt'><br>
|
||
IMPORTANT NOTE: </span><span style='font-size:12.0pt;font-weight:normal'>There
|
||
is a column in the log session display titled <20>State<74> which indicates the
|
||
running state of the log session. The possible values in this column are
|
||
<EFBFBD>GROUPING<EFBFBD>, <20>UNGROUPING<4E>, <20>RUNNING<4E>, <20>STOPPING<4E>, <20>STOPPED<45>, or <20>EXISTING<4E>.</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'>The trace log session will start automatically upon successful
|
||
creation. Right clicking on the log session line associated with the
|
||
desired log session in the upper window brings up a menu with options for the
|
||
log session:</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'><img width=895 height=306
|
||
src="CreatingNewTraceLogSessions_files/image011.jpg"></span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
|
||
normal'><br>
|
||
Trace output will begin to appear in the (lower) Output Display Window as soon
|
||
as it<69>s created.</span></h3>
|
||
|
||
<h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'> </span></h3>
|
||
|
||
<h3><span style='font-size:12.0pt'><img width=895 height=306
|
||
src="CreatingNewTraceLogSessions_files/image012.jpg"></span></h3>
|
||
|
||
<p><br>
|
||
In addition to displaying the trace log session parameters and the state of the
|
||
log session in the Trace Log Session List Window, three columns, Event Count,
|
||
Lost Events, and Buffers Read, give up to date values for active log sessions.</p>
|
||
|
||
<p><b>Creating Additional Log Sessions</b></p>
|
||
|
||
<p style='margin-bottom:12.0pt'>Additional Log Sessions may be added to
|
||
TraceView the same way as the first. Each log session results in a new
|
||
line being added to the Log Se<img width=2 height=1
|
||
src="CreatingNewTraceLogSessions_files/image015.jpg">ssion Window to describe
|
||
that session, and creation of a new Output Display Window. This is shown
|
||
below:</p>
|
||
|
||
<p style='margin-bottom:12.0pt'> </p>
|
||
|
||
<p style='margin-bottom:12.0pt'><img width=893 height=366
|
||
src="CreatingNewTraceLogSessions_files/image016.jpg"></p>
|
||
|
||
<p style='margin-bottom:12.0pt'> </p>
|
||
|
||
<p align=center style='margin-bottom:12.0pt;text-align:center'><b><span
|
||
style='font-size:10.0pt;font-family:Verdana'><a
|
||
href="CreatingNewTraceLogSessions.htm">Top of page</a></span></b></p>
|
||
|
||
<p align=center style='margin-bottom:12.0pt;text-align:center'> </p>
|
||
|
||
<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=873
|
||
style='width:654.65pt'>
|
||
<tr style='height:.05in'>
|
||
<td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:.05in'>
|
||
<p class=MsoNormal style='line-height:3.6pt'><span style='font-size:2.0pt'> </span></p>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<p><b><span style='font-size:11.0pt;font-family:"MS Sans Serif"'><EFBFBD> Microsoft
|
||
Corporation 2002</span></b></p>
|
||
|
||
<h3><span style='font-weight:normal'> </span></h3>
|
||
|
||
</div>
|
||
|
||
</body>
|
||
|
||
</html>
|