Creating new WMI based parameters


With the WMI Wizard, you can create new, user-defined parameters based on WMI data. 

To create new WMI-based parameters using the PATROL WMI Wizard

  1. Make sure that you have loaded the PATROL Wizard for Microsoft Performance Monitor and WMI KM files as described in Loading the PATROL Wizard for Microsoft Performance Monitor and WMI.
  2. Access the WMI Wizard (NT_WMI) application menu as described in Accessing KM menu commands.
  3. Choose the Create New Parameters menu command to display the Create WMI parameter dialog box.
  4. Type a name for the parameter you want to create using WMI data in the Parameter Name field.
  5. Type a valid statement in the Enter a WQL Query field. The query must return a numerical value.

    select NumberOfProcesses from Win32_OperatingSystem or select CurrentSize from Win32_RegistryFor WMI classes that begin with Win32_PerfRawData, the query must return a number for a single WMI property. For more information, see WMI queries for the WMI classes that begin with Win32_PerfRawData.

    select VirtualBytes from Win32_PerfRawData_PerfProc_Process where Name="Idle"

  6. Select the Formatted Data check box to normalize and display formatted performance data.

    Note

    You can select this check box only for Win32_PerfRawData WMI classes. For more information, see Performance counters supported through Win32_PerfRawData WMI class.

  7. In the Scaling Factor text box, enter a value between 0 and 2147483647to scale down values that cannot be directly set to parameters, such as WMI queries that return 64-bit integer values.

    If you specify the Select CommittedBytes from Win32_PerfRawData_PerfOS_Memory WMI query for a parameter specific to memory, enter a scaling factor of 1024. Thus, the returned value is divided by the specified scaling factor. Similarly, if the parameter is specific to time, you can enter a scaling factor of 1000 to convert a return value in milliseconds to seconds.

    Note

    By default, the scaling factor is 1. For 64-bit performance counters, if the return value of the WMI query is greater than 32-bit, you must scale down the values to get appropriate results.

  8. Click Next to set alarm thresholds for the parameter that you are creating.

    The Set Alarm Thresholds dialog box is displayed.

  9. For the parameter that needs warning and alarm thresholds:
    • Type the lower-bound warning value in the Warning Minimum field.
    • Type the upper-bound warning value in the Warning Maximum field.
    • Type the lower-bound alarm value in the Alarm Minimum field.
    • Type the upper-bound alarm value in the Alarm Maximum field.
  10. Click Create to create the parameter according to the SQL Query that you entered and close the dialog box.
  11. Click Done to create the parameters.
    The dialog box closes and PATROL creates your new parameters.
    If you want to create new parameters over again, click Next and continue with  step 7.
    After you have created new parameters on a particular PATROL Agent, other PATROL console users will not be able to see the new parameters that you created until they load the NT_PERFMON_WIZARD.kml file.

Performance counters supported through Win32_PerfRawData WMI class

The Win32_PerfRawData WMI class supports the following performance counters:

  • PERF_COUNTER_COUNTER
  • PERF_COUNTER_BULK_COUNT
  • PERF_COUNTER_LARGE_RAWCOUNT | PERF_COUNTER_LARGE_RAWCOUNT_HEX
  • PERF_COUNTER_RAWCOUNT_HEX | PERF_COUNTER_RAWCOUNT
  • PERF_100NSEC_TIMER
  • PERF_100NSEC_TIMER_INV
  • PERF_ELAPSED_TIME
  • PERF_PRECISION_100NS_TIMER
  • PERF_COUNTER_100NS_QUEUELEN_TYPE

WMI queries for the WMI classes that begin with Win32_PerfRawData

The KM enables you to execute the WQL queries for 64-bit counters and monitor the counters by using the wizard. It helps you verify whether the system on which the application is running is 32-bit or 64-bit, and correspondingly connect to a 32-bit or 64-bit WMI provider. 

You must enter a valid WMI query in the Enter a WQL query text box of the WMI Wizard dialog box. The query must return a number for a single WMI property.

Example

Valid WMI Query:Select VirtualBytes from Win32_PerfRawData_PerfProc_Process where Name="Idle" This returns the result for VirtualBytes for Idle process.Invalid WMI Queries:

  • Select * from Win32_PerfRawData_PerfProc_Process This returns the data for all the properties of Win32_PerfRawData_PerfProc_Process wmi class for all the instances. *** indicates all the properties for a particular WMI class.
  • Select VirtualBytes, PageFaultsPersec from Win32_PerfRawData_PerfProc_Process where Name="Idle" You cannot add two WMI properties such as VirtualBytes and PageFaultsPersec in a WQL query. Comma separated queries are invalid.

To verify whether a particular query returns a single instance or multiple instances, use wbemtest provided by Microsoft as shown in the following steps:

  1. Go to Start > Run > wbemtest
  2. Click Connect.
  3. Enter the Namespace such as \\root\cimv2. Click Connect.
  4. Click Query. Enter a query, Select * from Win32_PerfRawData_PerfProc_Process.

Verify the record set returned by wbemtest. If there are multiple instances, you need to add the where clause appropriately.

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*