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.

192 lines
8.4 KiB

  1. <html xmlns:o="urn:schemas-microsoft-com:office:office"
  2. xmlns:w="urn:schemas-microsoft-com:office:word"
  3. xmlns="http://www.w3.org/TR/REC-html40">
  4. <head>
  5. <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  6. <meta name=ProgId content=Word.Document>
  7. <meta name=Generator content="Microsoft Word 9">
  8. <meta name=Originator content="Microsoft Word 9">
  9. <link rel=File-List href="./readme_files/filelist.xml">
  10. <title>WMI Sample Filter Driver</title>
  11. <!--[if gte mso 9]><xml>
  12. <o:DocumentProperties>
  13. <o:LastAuthor>Alan Warwick</o:LastAuthor>
  14. <o:Revision>5</o:Revision>
  15. <o:TotalTime>3</o:TotalTime>
  16. <o:Created>2001-02-09T22:28:00Z</o:Created>
  17. <o:LastSaved>2001-04-28T20:19:00Z</o:LastSaved>
  18. <o:Pages>1</o:Pages>
  19. <o:Words>212</o:Words>
  20. <o:Characters>1210</o:Characters>
  21. <o:Company>Microsoft Internal</o:Company>
  22. <o:Lines>10</o:Lines>
  23. <o:Paragraphs>2</o:Paragraphs>
  24. <o:CharactersWithSpaces>1485</o:CharactersWithSpaces>
  25. <o:Version>9.4119</o:Version>
  26. </o:DocumentProperties>
  27. </xml><![endif]-->
  28. <style>
  29. <!--
  30. /* Font Definitions */
  31. @font-face
  32. {font-family:"MS Mincho";
  33. panose-1:2 2 6 9 4 2 5 8 3 4;
  34. mso-font-alt:"\FF2D\FF33 \660E\671D";
  35. mso-font-charset:128;
  36. mso-generic-font-family:modern;
  37. mso-font-pitch:fixed;
  38. mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
  39. @font-face
  40. {font-family:"\@MS Mincho";
  41. panose-1:2 2 6 9 4 2 5 8 3 4;
  42. mso-font-charset:128;
  43. mso-generic-font-family:modern;
  44. mso-font-pitch:fixed;
  45. mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
  46. /* Style Definitions */
  47. p.MsoNormal, li.MsoNormal, div.MsoNormal
  48. {mso-style-parent:"";
  49. margin:0in;
  50. margin-bottom:.0001pt;
  51. mso-pagination:widow-orphan;
  52. font-size:12.0pt;
  53. font-family:"Times New Roman";
  54. mso-fareast-font-family:"Times New Roman";}
  55. p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
  56. {margin:0in;
  57. margin-bottom:.0001pt;
  58. mso-pagination:widow-orphan;
  59. font-size:10.0pt;
  60. font-family:"Courier New";
  61. mso-fareast-font-family:"Times New Roman";}
  62. @page Section1
  63. {size:8.5in 11.0in;
  64. margin:1.0in 65.95pt 1.0in 65.95pt;
  65. mso-header-margin:.5in;
  66. mso-footer-margin:.5in;
  67. mso-paper-source:0;}
  68. div.Section1
  69. {page:Section1;}
  70. -->
  71. </style>
  72. </head>
  73. <body lang=EN-US style='tab-interval:.5in'>
  74. <div class=Section1>
  75. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>This
  76. sample does not have a dedicated .inf file. The file inf.txt has information <o:p></o:p></span></p>
  77. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>about
  78. the inf sections that need to be modified to the inf to which this filter
  79. driver <o:p></o:p></span></p>
  80. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>is
  81. attached.<o:p></o:p></span></p>
  82. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  83. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>If you
  84. have trouble getting the perfmon counters to show up within sysmon<o:p></o:p></span></p>
  85. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>then
  86. check the following<o:p></o:p></span></p>
  87. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  88. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>1. Use
  89. Wbemtest.exe or generated vbs test scripts to query the class <o:p></o:p></span></p>
  90. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><span
  91. style="mso-spacerun: yes">�� </span>and obtain instances with valid data.<o:p></o:p></span></p>
  92. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  93. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>2. The class
  94. has the HiPerf and PerfDetail qualifiers <o:p></o:p></span></p>
  95. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  96. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>3. Each
  97. property is a uint32, uint64, sint32 or sint64. Each property has <o:p></o:p></span></p>
  98. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><span
  99. style="mso-spacerun: yes">�� </span>a PerfDetail, DefaultScale and CounterType
  100. qualifier.<o:p></o:p></span></p>
  101. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  102. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  103. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  104. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>If the
  105. above steps do not help you may need to do the following:<o:p></o:p></span></p>
  106. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  107. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>1. Exit
  108. sysmon and stop the wmiapsrv service by typing &quot;net stop wmiapsrv&quot;<o:p></o:p></span></p>
  109. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  110. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>2. Go
  111. into the registry and delete the value <o:p></o:p></span></p>
  112. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><span
  113. style="mso-spacerun: yes">��
  114. </span>HKEY_LOCAL_MACHINE\Software\Microsoft\WBEM\Providers\Performance\Performance
  115. Data<o:p></o:p></span></p>
  116. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  117. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>3.
  118. Restart the wmiapsrv service by typing &quot;net start wmiapsrv&quot;<o:p></o:p></span></p>
  119. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  120. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>4. The
  121. above registry value should be repopulated with data that includes<o:p></o:p></span></p>
  122. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><span
  123. style="mso-spacerun: yes">�� </span>the text of you class name and properties.<o:p></o:p></span></p>
  124. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  125. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>The
  126. first time you click the add counters button in sysmon you will not see <o:p></o:p></span></p>
  127. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>the WMI
  128. counters in the list. At this point you should open task manager<o:p></o:p></span></p>
  129. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>(by
  130. running taskmgr.exe) and wait until the winmgmt.exe process returns to<o:p></o:p></span></p>
  131. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>0% cpu
  132. utilization. Now click the add counters button again and you will<o:p></o:p></span></p>
  133. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>see the
  134. WMI counters in the list.<o:p></o:p></span></p>
  135. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  136. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>Also be
  137. aware that you should not start any drivers containing binary mofs<o:p></o:p></span></p>
  138. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>or use
  139. mofcomp.exe to compile in any mofs with WMI perfcounters while<o:p></o:p></span></p>
  140. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'>sysmon
  141. is running.<o:p></o:p></span></p>
  142. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  143. <p class=MsoPlainText><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></span></p>
  144. </div>
  145. </body>
  146. </html>