wbemQueryQualifiers
wbemQueryQualifiers(className: String; attributeNames: StringArray input; counterTypes: IntegerArray input; scaleFactors: IntegerArray input);
The wbemQueryQualifiers method of the Node class retrieves the names, type, and scale factor for each attribute of Web-Based Enterprise Management (WBEM) class specified by the className parameter. This allows attribute values returned by the wbemRetrieveData method defined in the Node class to be correctly interpreted.
The qualifier information is placed into three matched arrays. Information for the first attribute is placed into the first member of each of the three arrays, information for the second attribute is placed into the second member, and so on.
The caller is responsible for creating and deleting the three arrays. This method always empties these arrays before inserting the qualifier information.
The class name must be a fully qualified WBEM class name.
JADE allows only a subset of the available WBEM classes to be used. The allowed classes are those relating to cache, memory, system, processor, server, disk, and network interface information. The wbemListClasses method of the Node class can be used to retrieve the fully qualified WBEM class names that can be used.
An exception is raised if a name that is not allowed or recognized is used.
The string array specified by the attributeNames parameter contains the name of each attribute for the specified class. These match the names of the attributes that the wbemRetrieveData method creates in the JadeDynamicObject it uses.
The integer array specified by the counterTypes parameter contains performance counter type values for the attributes. The values are those defined by Microsoft and documented in the MSDN (Microsoft Developer Network) literature.
The integer array specified by the scaleFactors parameter contains the default scale factor to be applied to the attribute values. This is a power of 10 that can be used to estimate the likely range of the value.
The meaning of each counter type value and the correct way to extract meaningful information from the attribute values is described in the MSDN literature. Searching using WMI Performance Counter Types should locate the relevant information.
The following example shows the use of the wbemQueryQualifiers method.
showWbemQualifiers(); vars hsa : HugeStringArray; ctrNames : StringArray; ctrTypes : IntegerArray; ctrScaleFactors : IntegerArray; cls : String; i : Integer; begin create hsa transient; create ctrNames transient; create ctrTypes transient; create ctrScaleFactors transient; node.wbemListClasses(hsa); if hsa.size > 0 then cls := hsa[1]; hsa.purge; write "WBEM class : " & cls; node.wbemQueryQualifiers(cls, ctrNames, ctrTypes, ctrScaleFactors); foreach i in 1 to ctrNames.size do write "Attribute: " & ctrNames[i] & " type: " & ctrTypes[i].String & " scale factor: " & ctrScaleFactors[i].String; endforeach; endif; epilog delete hsa; delete ctrNames; delete ctrTypes; delete ctrScaleFactors; end;
The output from the wbemQueryQualifiers method shown in the previous example is as follows.
WBEM class : Root.CIMV2.CIM_StatisticalInformation.Win32_Perf.Win32_PerfRawData.Win32_PerfRawData_PerfDisk_LogicalDisk Attribute: AvgDiskBytesPerRead type: 1073874176 scale factor: -2 Attribute: AvgDiskBytesPerRead_Base type: 1073939458 scale factor: 0 Attribute: AvgDiskBytesPerTransfer type: 1073874176 scale factor: -2 Attribute: AvgDiskBytesPerTransfer_Base type: 1073939458 scale factor: 0 Attribute: AvgDiskBytesPerWrite type: 1073874176 scale factor: -2 Attribute: AvgDiskBytesPerWrite_Base type: 1073939458 scale factor: 0 Attribute: AvgDiskQueueLength type: 5571840 scale factor: 2 Attribute: AvgDiskReadQueueLength type: 5571840 scale factor: 2 Attribute: AvgDisksecPerRead type: 805438464 scale factor: 3 Attribute: AvgDisksecPerRead_Base type: 1073939458 scale factor: 0 Attribute: AvgDisksecPerTransfer type: 805438464 scale factor: 3 Attribute: AvgDisksecPerTransfer_Base type: 1073939458 scale factor: 0 Attribute: AvgDisksecPerWrite type: 805438464 scale factor: 3 Attribute: AvgDisksecPerWrite_Base type: 1073939458 scale factor: 0 Attribute: AvgDiskWriteQueueLength type: 5571840 scale factor: 2 Attribute: Caption type: 0 scale factor: 0 Attribute: CurrentDiskQueueLength type: 65536 scale factor: 1 Attribute: Description type: 0 scale factor: 0 Attribute: DiskBytesPersec type: 272696576 scale factor: -4 Attribute: DiskReadBytesPersec type: 272696576 scale factor: -4 Attribute: DiskReadsPersec type: 272696320 scale factor: 0 Attribute: DiskTransfersPersec type: 272696320 scale factor: 0 Attribute: DiskWriteBytesPersec type: 272696576 scale factor: -4 Attribute: DiskWritesPersec type: 272696320 scale factor: 0 Attribute: FreeMegabytes type: 65536 scale factor: 0 Attribute: Frequency_Object type: 0 scale factor: 0 Attribute: Frequency_PerfTime type: 0 scale factor: 0 Attribute: Frequency_Sys100NS type: 0 scale factor: 0 Attribute: Name type: 0 scale factor: 0 Attribute: PercentDiskReadTime type: 542573824 scale factor: 0 Attribute: PercentDiskReadTime_Base type: 1073939712 scale factor: 0 Attribute: PercentDiskTime type: 542573824 scale factor: 0 Attribute: PercentDiskTime_Base type: 1073939712 scale factor: 0 Attribute: PercentDiskWriteTime type: 542573824 scale factor: 0 Attribute: PercentDiskWriteTime_Base type: 1073939712 scale factor: 0 Attribute: PercentFreeSpace type: 537003008 scale factor: 0 Attribute: PercentFreeSpace_Base type: 1073939459 scale factor: 0 Attribute: PercentIdleTime type: 542573824 scale factor: 0 Attribute: PercentIdleTime_Base type: 1073939712 scale factor: 0 Attribute: SplitIOPerSec type: 272696320 scale factor: 0 Attribute: Timestamp_Object type: 0 scale factor: 0 Attribute: Timestamp_PerfTime type: 0 scale factor: 0 Attribute: Timestamp_Sys100NS type: 0 scale factor: 0