Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

328 lines
15 KiB

  1. <html>
  2. <head>
  3. <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  4. <meta name=Generator content="Microsoft Word 10 (filtered)">
  5. <title>Creating Trace Log Sessions</title>
  6. <style>
  7. <!--
  8. /* Font Definitions */
  9. @font-face
  10. {font-family:Verdana;
  11. panose-1:2 11 6 4 3 5 4 4 2 4;}
  12. @font-face
  13. {font-family:"MS Sans Serif";
  14. panose-1:0 0 0 0 0 0 0 0 0 0;}
  15. /* Style Definitions */
  16. p.MsoNormal, li.MsoNormal, div.MsoNormal
  17. {margin:0in;
  18. margin-bottom:.0001pt;
  19. font-size:12.0pt;
  20. font-family:"Times New Roman";}
  21. h1
  22. {margin-top:12.0pt;
  23. margin-right:0in;
  24. margin-bottom:3.0pt;
  25. margin-left:0in;
  26. page-break-after:avoid;
  27. font-size:16.0pt;
  28. font-family:Arial;
  29. font-weight:bold;}
  30. h3
  31. {margin-right:0in;
  32. margin-left:0in;
  33. font-size:13.5pt;
  34. font-family:"Times New Roman";
  35. font-weight:bold;}
  36. h4
  37. {margin-top:12.0pt;
  38. margin-right:0in;
  39. margin-bottom:3.0pt;
  40. margin-left:0in;
  41. page-break-after:avoid;
  42. font-size:14.0pt;
  43. font-family:"Times New Roman";
  44. font-weight:bold;}
  45. a:link, span.MsoHyperlink
  46. {color:blue;
  47. text-decoration:underline;}
  48. a:visited, span.MsoHyperlinkFollowed
  49. {color:blue;
  50. text-decoration:underline;}
  51. p
  52. {margin-right:0in;
  53. margin-left:0in;
  54. font-size:12.0pt;
  55. font-family:"Times New Roman";}
  56. @page Section1
  57. {size:8.5in 11.0in;
  58. margin:1.0in 1.25in 1.0in 1.25in;}
  59. div.Section1
  60. {page:Section1;}
  61. -->
  62. </style>
  63. </head>
  64. <body lang=EN-US link=blue vlink=blue>
  65. <div class=Section1>
  66. <h1><span style='font-size:24.0pt;font-family:"Times New Roman"'>Creating New
  67. Trace Log Sessions</span></h1>
  68. <h4><span style='font-size:12.0pt'>Using TraceView To Create A New Log Session</span></h4>
  69. <p style='margin-bottom:12.0pt'>TraceView can be started by running it from the
  70. command-line with no options, or double clicking its icon in Windows Explorer.
  71. &nbsp;A new trace logging session may be started by selecting &quot;File&quot;
  72. and then &quot;Create New Log Session&quot;. &nbsp;Alternatively, right
  73. clicking any blank area of the Log Session window causes a pop-up menu to
  74. appear from which appropriate action can be selected.</p>
  75. <p style='margin-bottom:12.0pt'><br>
  76. <img width=852 height=187 src="CreatingNewTraceLogSessions_files/image001.jpg"></p>
  77. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  78. normal'><br>
  79. Selecting �Create New Log Session� pops up the </span><span style='font-size:
  80. 12.0pt'>Create New Log Session</span><span style='font-size:12.0pt;font-weight:
  81. normal'> window.&nbsp; This window lists all the providers that are active for
  82. this log session by PDB file name, CTL file name, Kernel Logger name, or
  83. control GUID, depending on how the control information is provided.&nbsp; Since
  84. no trace providers have been defined yet, the Provider List is initially empty.</span></h3>
  85. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  86. <h3><span style='font-size:12.0pt'><img width=441 height=362
  87. src="CreatingNewTraceLogSessions_files/image002.jpg"></span></h3>
  88. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  89. normal'><br>
  90. To add a trace provider, click the </span><span style='font-size:12.0pt'>Add
  91. Provider </span><span style='font-size:12.0pt;font-weight:normal'>button to
  92. launch the </span><span style='font-size:12.0pt'>Provider Control GUID Setup</span><span
  93. style='font-size:12.0pt;font-weight:normal'> dialog:</span></h3>
  94. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  95. <h3><span style='font-size:12.0pt;font-weight:normal'><img width=413
  96. height=442 src="CreatingNewTraceLogSessions_files/image003.jpg"></span></h3>
  97. <h3><span style='font-size:12.0pt;font-weight:normal'>&nbsp;</span><span
  98. style='font-size:12.0pt'><br>
  99. </span><span style='font-size:12.0pt;font-weight:normal'>There are four
  100. possible way to identify a trace provider to TraceView:</span></h3>
  101. <h3 style='margin-left:.5in;text-indent:-.25in'><span style='font-size:12.0pt;
  102. font-weight:normal'>1.&nbsp;&nbsp;&nbsp; Identify a PDB file associated with
  103. the trace provider.&nbsp; For example, when building a driver that includes
  104. support for ETW, the created PDB file contains both the Control and Format GUID
  105. information used by the driver.&nbsp; Identifying the PDB file associated with
  106. a trace provider is the quickest and easiest way to get started with tracing.</span></h3>
  107. <h3 style='margin-left:.5in;text-indent:-.25in'><span style='font-size:12.0pt;
  108. font-weight:normal'>2.&nbsp;&nbsp;&nbsp; Identify a GUID control file (by
  109. convention, file type .CTL), which is a text file containing the control
  110. GUID.&nbsp; This is the same .CTL file type that may be familiar from using the
  111. TraceLog command-line utility.</span></h3>
  112. <h3 style='margin-left:.5in;text-indent:-.25in'><span style='font-size:12.0pt;
  113. font-weight:normal'>3.&nbsp;&nbsp;&nbsp; Manually enter (or paste) the control
  114. GUID into the space provided by TraceView in the format:
  115. 00000000-0000-0000-0000-000000000000.</span></h3>
  116. <h3 style='margin-left:.5in;text-indent:-.25in'><span style='font-size:12.0pt;
  117. font-weight:normal'>4.&nbsp;&nbsp;&nbsp; The NT Kernel Logger can be selected
  118. as a provider and the Kernel Logger control information will be used
  119. automatically.</span></h3>
  120. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  121. normal'>The method used to identify the trace provider is selected by clicking
  122. on the appropriate radio button in the dialog above.&nbsp; If the PDB File or
  123. CTL File method is selected, the file name and path information may be entered
  124. manually or the browse button (the button with ��� to the right of the edit box
  125. for the file name) may be used to browse for the correct file.&nbsp; For
  126. example, clicking the ��� browse button to the right of the PDB file edit box,
  127. brings up the following dialog, which has been used to selected the file tracedrv.pdb:</span></h3>
  128. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  129. <h3><span style='font-size:12.0pt'><img width=428 height=273
  130. src="CreatingNewTraceLogSessions_files/image004.jpg"></span></h3>
  131. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  132. normal'><br>
  133. Clicking �Open� in the Open PDB File dialog opens the indicated file and
  134. returns to the </span><span style='font-size:12.0pt'>Provider Control GUID Setup</span><span
  135. style='font-size:12.0pt;font-weight:normal'> dialog:</span></h3>
  136. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  137. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'><img width=413
  138. height=442 src="CreatingNewTraceLogSessions_files/image005.jpg"></span></h3>
  139. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  140. normal'><br>
  141. Clicking �OK� in the </span><span style='font-size:12.0pt'>Provider Control
  142. GUID Setup</span><span style='font-size:12.0pt;font-weight:normal'> dialog
  143. returns to the </span><span style='font-size:12.0pt'>Log Session Providers
  144. Dialog</span><span style='font-size:12.0pt;font-weight:normal'>.&nbsp; The name
  145. of the PDB file has now been filled into the Provider List indicating a
  146. provider has been supplied.</span></h3>
  147. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  148. <h3><span style='font-size:12.0pt;font-weight:normal'><img width=441
  149. height=362 src="CreatingNewTraceLogSessions_files/image006.jpg"></span></h3>
  150. <h3><span style='font-size:12.0pt;font-weight:normal'><br>
  151. At this point, additional providers may be added to this log session by
  152. clicking �Add Provider� again and following the procedures above.</span></h3>
  153. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  154. normal'>When all providers have been identified, the �Next� button is selected
  155. to display the </span><span style='font-size:12.0pt'>Log Session Options</span><span
  156. style='font-size:12.0pt;font-weight:normal'> pane of the </span><span
  157. style='font-size:12.0pt'>Create New Log Session</span><span style='font-size:
  158. 12.0pt;font-weight:normal'> dialog:</span></h3>
  159. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  160. <h3><span style='font-size:12.0pt'><img width=441 height=362
  161. src="CreatingNewTraceLogSessions_files/image007.jpg"></span></h3>
  162. <h3><span style='font-size:12.0pt;font-weight:normal'><br>
  163. The </span><span style='font-size:12.0pt'>Log Session Options</span><span
  164. style='font-size:12.0pt;font-weight:normal'> pane allows the user to define
  165. whether the trace log session will generate real-time output, or whether data
  166. will be logged to a trace log data (.etl) file, or both.&nbsp; The name of the
  167. binary log file may be changed or browsed for from this dialog.&nbsp; A unique
  168. name for the log session may be provided as well. &nbsp;Default names for both
  169. the log file and log session are provided as shown.&nbsp; </span></h3>
  170. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  171. normal'>Trace log listing and summary output files can also be generated by
  172. TraceView.&nbsp;&nbsp; These files are identical to those generated by the
  173. TraceFmt command-line utility.&nbsp; Control of the generation of these files,
  174. and setting of their names, is accomplished by clicking on the �</span><span
  175. style='font-size:12.0pt'>Advanced Log Session Options</span><span
  176. style='font-size:12.0pt;font-weight:normal'> &gt;&gt;� button.&nbsp; </span></h3>
  177. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  178. <h3><span style='font-size:12.0pt'><img width=433 height=361
  179. src="CreatingNewTraceLogSessions_files/image008.jpg"></span></h3>
  180. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  181. normal'><br>
  182. The default log session options can be changed by clicking on the �</span><span
  183. style='font-size:12.0pt'>Advanced Log Session Options</span><span
  184. style='font-size:12.0pt;font-weight:normal'> &gt;&gt;� button and selecting the
  185. </span><span style='font-size:12.0pt'>Log Session Parameter Options</span><span
  186. style='font-size:12.0pt;font-weight:normal'> tab of the </span><span
  187. style='font-size:12.0pt'>Advanced Log Session Options</span><span
  188. style='font-size:12.0pt;font-weight:normal'> dialog:</span></h3>
  189. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  190. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  191. normal'><img width=433 height=361
  192. src="CreatingNewTraceLogSessions_files/image009.jpg"></span></h3>
  193. <h3><span style='font-size:12.0pt;font-weight:normal'><br>
  194. Grayed out items cannot be modified, but parameters listed with dark text may
  195. have their values altered.&nbsp; Some parameters are exclusive of others, so
  196. providing values for certain parameters may clear or alter the values of
  197. others.&nbsp; Clicking on the �OK� button exits the </span><span
  198. style='font-size:12.0pt'>Advanced Log Session Options</span><span
  199. style='font-size:12.0pt;font-weight:normal'> dialog.&nbsp; </span></h3>
  200. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  201. normal'>Clicking on the �Finish� button back in the </span><span
  202. style='font-size:12.0pt'>Create New Log Session</span><span style='font-size:
  203. 12.0pt;font-weight:normal'> dialog exits the dialog.&nbsp; TraceView displays
  204. information about the newly created log session in the Log Session Window (the
  205. top window pane in the screen shot below), and an empty (until trace event are
  206. picked up) Log Session Output Display Window (the bottom pane):</span></h3>
  207. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  208. <h3><span style='font-size:12.0pt'><img width=895 height=306
  209. src="CreatingNewTraceLogSessions_files/image010.jpg"></span></h3>
  210. <h3><span style='font-size:12.0pt'><br>
  211. IMPORTANT NOTE: </span><span style='font-size:12.0pt;font-weight:normal'>There
  212. is a column in the log session display titled �State� which indicates the
  213. running state of the log session.&nbsp; The possible values in this column are
  214. �GROUPING�, �UNGROUPING�, �RUNNING�, �STOPPING�, �STOPPED�, or �EXISTING�.</span></h3>
  215. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  216. normal'>The trace log session will start automatically upon successful
  217. creation.&nbsp; Right clicking on the log session line associated with the
  218. desired log session in the upper window brings up a menu with options for the
  219. log session:</span></h3>
  220. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  221. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  222. normal'><img width=895 height=306
  223. src="CreatingNewTraceLogSessions_files/image011.jpg"></span></h3>
  224. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt;font-weight:
  225. normal'><br>
  226. Trace output will begin to appear in the (lower) Output Display Window as soon
  227. as it�s created.</span></h3>
  228. <h3 style='margin-bottom:13.5pt'><span style='font-size:12.0pt'>&nbsp;</span></h3>
  229. <h3><span style='font-size:12.0pt'><img width=895 height=306
  230. src="CreatingNewTraceLogSessions_files/image012.jpg"></span></h3>
  231. <p><br>
  232. In addition to displaying the trace log session parameters and the state of the
  233. log session in the Trace Log Session List Window, three columns, Event Count,
  234. Lost Events, and Buffers Read, give up to date values for active log sessions.</p>
  235. <p><b>Creating Additional Log Sessions</b></p>
  236. <p style='margin-bottom:12.0pt'>Additional Log Sessions may be added to
  237. TraceView the same way as the first.&nbsp; Each log session results in a new
  238. line being added to the Log Se<img width=2 height=1
  239. src="CreatingNewTraceLogSessions_files/image015.jpg">ssion Window to describe
  240. that session, and creation of a new Output Display Window.&nbsp; This is shown
  241. below:</p>
  242. <p style='margin-bottom:12.0pt'>&nbsp;</p>
  243. <p style='margin-bottom:12.0pt'><img width=893 height=366
  244. src="CreatingNewTraceLogSessions_files/image016.jpg"></p>
  245. <p style='margin-bottom:12.0pt'>&nbsp;</p>
  246. <p align=center style='margin-bottom:12.0pt;text-align:center'><b><span
  247. style='font-size:10.0pt;font-family:Verdana'><a
  248. href="CreatingNewTraceLogSessions.htm">Top of page</a></span></b></p>
  249. <p align=center style='margin-bottom:12.0pt;text-align:center'>&nbsp;</p>
  250. <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=873
  251. style='width:654.65pt'>
  252. <tr style='height:.05in'>
  253. <td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:.05in'>
  254. <p class=MsoNormal style='line-height:3.6pt'><span style='font-size:2.0pt'>&nbsp;</span></p>
  255. </td>
  256. </tr>
  257. </table>
  258. <p><b><span style='font-size:11.0pt;font-family:"MS Sans Serif"'>� Microsoft
  259. Corporation 2002</span></b></p>
  260. <h3><span style='font-weight:normal'>&nbsp;</span></h3>
  261. </div>
  262. </body>
  263. </html>