wbemRetrieveData(className: String; instNameArray: HugeStringArray; jdoArray: JadeDynamicObjectArray input);
The wbemRetrieveData method of the Node class retrieves Web-Based Enterprise Management (WBEM) instances and attribute values for a specified WBEM class. The values are retrieved from the machine in which the node of the receiver object is running.
JADE allows only a subset of classes to be used. The allowed classes are those relating to cache, memory, system, processor, server, disk, and network interface information.
A
The caller is responsible for creating and deleting the JadeDynamicObjectArray instance, and for deleting any JadeDynamicObject instances that are added to it.
The instNameArray parameter is used to select the set of WBEM instances that are retrieved. If used, the array should contain a set of strings representing the names of the WBEM instances to be retrieved. Only WBEM instances that have names that match entries in the array are returned. If the value of the instNameArray parameter is null, all instances for the class specified by the className parameter are returned.
As this method does not clear or purge the JadeDynamicObjectArray before inserting the JadeDynamicObject instances, if it is called multiple times without first calling the purge or clear methods, previously added entries will remain in the array.
Each JadeDynamicObject that is created contains attributes representing each attribute of the corresponding WBEM instance. The name of each attribute matches the WBEM class attribute name. The attribute value is one of the following types, depending on the corresponding WBEM attribute type:
JADE converts WBEM attributes that are arrays into individual attributes with the array index inserted at the end of each attribute name. Although unlikely, applications should be prepared for the possibility that cumulative Integer64 values will overflow to negative values. The maximum value before they overflow to a negative value is 2^63 - 1 (approximately 8 Exabytes).
There are some attributes that are not returned by JADE. These are mainly attributes that pertain to WBEM class and superclass names.
There is a limit of approximately 48K bytes to the size of the WBEM data that can be retrieved from remote nodes. If this limit is exceeded, exception 1141 is raised, in which case you should use the instNameArray parameter to restrict the number of WBEM class instances that are retrieved.
If a name that is not allowed or recognized is used, exception 1136 is raised.
The following example shows the use of the wbemRetrieveData method.
showWbemCPUInformation(); vars wbemClassName : String; jdoArray : JadeDynamicObjectArray; jdo : JadeDynamicObject; begin wbemClassName := "Root.CIMV2.CIM_StatisticalInformation.Win32_Perf." & "Win32_PerfFormattedData.Win32_PerfFormattedData_" & "PerfOS_Processor"; create jdoArray transient; node.wbemRetrieveData(wbemClassName, null, jdoArray); foreach jdo in jdoArray do write jdo.display; endforeach; epilog jdoArray.purge; delete jdoArray; end;
The following example shows the use of the instNameArray parameter to restrict the number of WBEM class instances retrieved by the wbemRetrieveData method.
showWbemLogicalDiskInformation(); vars wbemClassName : String; jdoArray : JadeDynamicObjectArray; hsa : HugeStringArray; jdo : JadeDynamicObject; begin wbemClassName := "Root.CIMV2.CIM_StatisticalInformation.Win32_Perf." & "Win32_PerfRawData.Win32_PerfRawData_PerfDisk_ & "LogicalDisk"; create hsa transient; hsa[1] := "C:"; hsa[2] := "E:"; create jdoArray transient; node.wbemRetrieveData(wbemClassName, hsa, jdoArray); foreach jdo in jdoArray do write jdo.display; endforeach; epilog delete hsa; jdoArray.purge; delete jdoArray; end;
The output from the wbemRetrieveData method shown in the previous example is as follows.
Root.CIMV2.CIM_StatisticalInformation.Win32_Perf.Win32_PerfRawData.Win32_PerfRawData_PerfDisk_LogicalDisk(116)--- CIMPath = \\wilbur2a\root\cimv2:Win32_PerfRawData_PerfDisk_LogicalDisk.Name="C:" CIMServer = WILBUR2A CIMClass = Win32_PerfRawData_PerfDisk_LogicalDisk AvgDiskBytesPerRead = 10004757504 AvgDiskBytesPerRead_Base = 450205 AvgDiskBytesPerTransfer = 27031866880 AvgDiskBytesPerTransfer_Base = 1234382 AvgDiskBytesPerWrite = 17027109376 AvgDiskBytesPerWrite_Base = 784177 AvgDiskQueueLength = 2183210108 AvgDiskReadQueueLength = 2379370099 AvgDisksecPerRead = 3604485205 AvgDisksecPerRead_Base = 450205 AvgDisksecPerTransfer = 1117796622 AvgDisksecPerTransfer_Base = 1234382 AvgDisksecPerWrite = 1808278713 AvgDisksecPerWrite_Base = 784177 AvgDiskWriteQueueLength = -196159991 Caption = NULL CurrentDiskQueueLength = 0 Description = NULL DiskBytesPersec = 27031866880 DiskReadBytesPersec = 10004757504 DiskReadsPersec = 450205 DiskTransfersPersec = 1234382 DiskWriteBytesPersec = 17027109376 DiskWritesPersec = 784177 FreeMegabytes = 15309 Frequency_Object = 0 Frequency_PerfTime = 3192100000 Frequency_Sys100NS = 10000000 Name = C: PercentDiskReadTime = 2379370099 PercentDiskReadTime_Base = 128217570284699662 PercentDiskTime = 2183210108 PercentDiskTime_Base = 128217570284699662 PercentDiskWriteTime = -196159991 PercentDiskWriteTime_Base = 128217570284699662 PercentFreeSpace = 15309 PercentFreeSpace_Base = 72763 PercentIdleTime = -742782462 PercentIdleTime_Base = 128217570284699662 SplitIOPerSec = 69672 Timestamp_Object = 0 Timestamp_PerfTime = 1651626206541880 Timestamp_Sys100NS = 128217570284699662 ---Root.CIMV2.CIM_StatisticalInformation.Win32_Perf.Win32_PerfRawData.Win32_PerfRawData_PerfDisk_LogicalDisk(116)--- CIMPath = \\wilbur2a\root\cimv2:Win32_PerfRawData_PerfDisk_LogicalDisk.Name="E:" CIMServer = WILBUR2A CIMClass = Win32_PerfRawData_PerfDisk_LogicalDisk AvgDiskBytesPerRead = 9827585536 AvgDiskBytesPerRead_Base = 290889 AvgDiskBytesPerTransfer = 15723511808 AvgDiskBytesPerTransfer_Base = 397212 AvgDiskBytesPerWrite = 5895926272 AvgDiskBytesPerWrite_Base = 106323 AvgDiskQueueLength = 3881830496 AvgDiskReadQueueLength = 2274370873 AvgDisksecPerRead = 152453346 AvgDisksecPerRead_Base = 290889 AvgDisksecPerTransfer = 2168531380 AvgDisksecPerTransfer_Base = 397212 AvgDisksecPerWrite = 2016078033 AvgDisksecPerWrite_Base = 106323 AvgDiskWriteQueueLength = 1607459623 Caption = NULL CurrentDiskQueueLength = 0 Description = NULL DiskBytesPersec = 15723511808 DiskReadBytesPersec = 9827585536 DiskReadsPersec = 290889 DiskTransfersPersec = 397212 DiskWriteBytesPersec = 5895926272 DiskWritesPersec = 106323 FreeMegabytes = 103216 Frequency_Object = 0 Frequency_PerfTime = 3192100000 Frequency_Sys100NS = 10000000 Name = E: PercentDiskReadTime = 2274370873 PercentDiskReadTime_Base = 128217570284699662 PercentDiskTime = 3881830496 PercentDiskTime_Base = 128217570284699662 PercentDiskWriteTime = 1607459623 PercentDiskWriteTime_Base = 128217570284699662 PercentFreeSpace = 103216 PercentFreeSpace_Base = 190779 PercentIdleTime = 1794241932 PercentIdleTime_Base = 128217570284699662 SplitIOPerSec = 6177 Timestamp_Object = 0 Timestamp_PerfTime = 1651626206541880 Timestamp_Sys100NS = 128217570284699662