Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » WMI » vbscript sample

Win32_PerfFormattedData_WSearchIdxPi vbscript sample code

The foundations for Manageability in Windows is Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).

ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself. The Win32_PerfFormattedData_WSearchIdxPi WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Sample Code

Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * From Win32_PerfFormattedData_WSearchIdxPi_SearchIndexer")

For Each objItem in colItems
	WScript.Echo "ActiveConnections:" & objItem.ActiveConnections
	WScript.Echo "Caption:" & objItem.Caption
	WScript.Echo "CleanWidSets:" & objItem.CleanWidSets
	WScript.Echo "Description:" & objItem.Description
	WScript.Echo "DirtyWidSets:" & objItem.DirtyWidSets
	WScript.Echo "DocumentsFiltered:" & objItem.DocumentsFiltered
	WScript.Echo "Frequency_Object:" & objItem.Frequency_Object
	WScript.Echo "Frequency_PerfTime:" & objItem.Frequency_PerfTime
	WScript.Echo "Frequency_Sys100NS:" & objItem.Frequency_Sys100NS
	WScript.Echo "IndexSize:" & objItem.IndexSize
	WScript.Echo "L0IndexesWordlists:" & objItem.L0IndexesWordlists
	WScript.Echo "L0MergeFlushCount:" & objItem.L0MergeFlushCount
	WScript.Echo "L0MergeFlushSpeedAverage:" & objItem.L0MergeFlushSpeedAverage
	WScript.Echo "L0MergeFlushSpeedLast:" & objItem.L0MergeFlushSpeedLast
	WScript.Echo "L0MergesflushesNow:" & objItem.L0MergesflushesNow
	WScript.Echo "L1MergeCount:" & objItem.L1MergeCount
	WScript.Echo "L1MergesNow:" & objItem.L1MergesNow
	WScript.Echo "L1MergeSpeedaverage:" & objItem.L1MergeSpeedaverage
	WScript.Echo "L1MergeSpeedlast:" & objItem.L1MergeSpeedlast
	WScript.Echo "L2MergeCount:" & objItem.L2MergeCount
	WScript.Echo "L2MergesNow:" & objItem.L2MergesNow
	WScript.Echo "L2MergeSpeedaverage:" & objItem.L2MergeSpeedaverage
	WScript.Echo "L2MergeSpeedlast:" & objItem.L2MergeSpeedlast
	WScript.Echo "L3MergeCount:" & objItem.L3MergeCount
	WScript.Echo "L3MergesNow:" & objItem.L3MergesNow
	WScript.Echo "L3MergeSpeedaverage:" & objItem.L3MergeSpeedaverage
	WScript.Echo "L3MergeSpeedlast:" & objItem.L3MergeSpeedlast
	WScript.Echo "L4MergeCount:" & objItem.L4MergeCount
	WScript.Echo "L4MergesNow:" & objItem.L4MergesNow
	WScript.Echo "L4MergeSpeedaverage:" & objItem.L4MergeSpeedaverage
	WScript.Echo "L4MergeSpeedlast:" & objItem.L4MergeSpeedlast
	WScript.Echo "L5MergeCount:" & objItem.L5MergeCount
	WScript.Echo "L5MergesNow:" & objItem.L5MergesNow
	WScript.Echo "L5MergeSpeedaverage:" & objItem.L5MergeSpeedaverage
	WScript.Echo "L5MergeSpeedlast:" & objItem.L5MergeSpeedlast
	WScript.Echo "L6MergeCount:" & objItem.L6MergeCount
	WScript.Echo "L6MergesNow:" & objItem.L6MergesNow
	WScript.Echo "L6MergeSpeedaverage:" & objItem.L6MergeSpeedaverage
	WScript.Echo "L6MergeSpeedlast:" & objItem.L6MergeSpeedlast
	WScript.Echo "L7MergeCount:" & objItem.L7MergeCount
	WScript.Echo "L7MergesNow:" & objItem.L7MergesNow
	WScript.Echo "L7MergeSpeedaverage:" & objItem.L7MergeSpeedaverage
	WScript.Echo "L7MergeSpeedlast:" & objItem.L7MergeSpeedlast
	WScript.Echo "L8MergeCount:" & objItem.L8MergeCount
	WScript.Echo "L8MergesNow:" & objItem.L8MergesNow
	WScript.Echo "L8MergeSpeedaverage:" & objItem.L8MergeSpeedaverage
	WScript.Echo "L8MergeSpeedlast:" & objItem.L8MergeSpeedlast
	WScript.Echo "MasterIndexLevel:" & objItem.MasterIndexLevel
	WScript.Echo "MasterMergeProgress:" & objItem.MasterMergeProgress
	WScript.Echo "MasterMergesNow:" & objItem.MasterMergesNow
	WScript.Echo "MasterMergestoDate:" & objItem.MasterMergestoDate
	WScript.Echo "Name:" & objItem.Name
	WScript.Echo "PersistentIndexes:" & objItem.PersistentIndexes
	WScript.Echo "PersistentIndexesL1:" & objItem.PersistentIndexesL1
	WScript.Echo "PersistentIndexesL2:" & objItem.PersistentIndexesL2
	WScript.Echo "PersistentIndexesL3:" & objItem.PersistentIndexesL3
	WScript.Echo "PersistentIndexesL4:" & objItem.PersistentIndexesL4
	WScript.Echo "PersistentIndexesL5:" & objItem.PersistentIndexesL5
	WScript.Echo "PersistentIndexesL6:" & objItem.PersistentIndexesL6
	WScript.Echo "PersistentIndexesL7:" & objItem.PersistentIndexesL7
	WScript.Echo "PersistentIndexesL8:" & objItem.PersistentIndexesL8
	WScript.Echo "Queries:" & objItem.Queries
	WScript.Echo "QueriesFailed:" & objItem.QueriesFailed
	WScript.Echo "QueriesSucceeded:" & objItem.QueriesSucceeded
	WScript.Echo "ShadowMergeLevels:" & objItem.ShadowMergeLevels
	WScript.Echo "ShadowMergeLevelsThreshold:" & objItem.ShadowMergeLevelsThreshold
	WScript.Echo "Timestamp_Object:" & objItem.Timestamp_Object
	WScript.Echo "Timestamp_PerfTime:" & objItem.Timestamp_PerfTime
	WScript.Echo "Timestamp_Sys100NS:" & objItem.Timestamp_Sys100NS
	WScript.Echo "UniqueKeys:" & objItem.UniqueKeys
	WScript.Echo "WorkItemsCreated:" & objItem.WorkItemsCreated
	WScript.Echo "WorkItemsDeleted:" & objItem.WorkItemsDeleted
	WScript.Echo ""
	WScript.Echo "########"
	WScript.Echo ""
Next