Windows Management Instrumentation SDK Sample


PerfMon

This sample illustrates how to retrieve PerfMon counter values from WMI.  Note that the accompanying MOF (perfmon.mof) must be compiled and loaded for this sample to run correctly.  The MOF file contains class definitions of the performance counters to be read by the sample.

 

Compiling the PerfMon MOF

 

The PerfMon MOF can be compiled by doing the following:

 

1.      At the command prompt, change directory to the installation drive and directory of the PerfMon sample (e.g., D:\>Program Files\WMI\samples\Scripting\WSH\VBScript\PerfMon):

 

CD “\Program Files\WMI\samples\Scripting\WSH\VBScript\PerfMon”

 

2.      Once in the installation directory, compile the PerfMon MOF using the WMI MOF compiler, MOFCOMP:

 

MOFCOMP perfmon.mof

 

Once the MOF is compiled, the PerfMon script may be run and the results of the performance counter query will be displayed.

 

© 1998-1999 Microsoft Corporation. All rights reserved.