Contact Info

Crumbtrail

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

Win32_PerfFormattedData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSAccessMethods 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_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSAccessMethods WMI class can be used in ActiveXperts Network Monitor to monitor your servers.


Sample Code

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSAccessMethods",,48)
For Each objItem in colItems
    Wscript.Echo "AUcleanupbatchesPersec: " & objItem.AUcleanupbatchesPersec
    Wscript.Echo "AUcleanupsPersec: " & objItem.AUcleanupsPersec
    Wscript.Echo "ByreferenceLobCreateCount: " & objItem.ByreferenceLobCreateCount
    Wscript.Echo "ByreferenceLobUseCount: " & objItem.ByreferenceLobUseCount
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "CountLobReadahead: " & objItem.CountLobReadahead
    Wscript.Echo "CountPullInRow: " & objItem.CountPullInRow
    Wscript.Echo "CountPushOffRow: " & objItem.CountPushOffRow
    Wscript.Echo "DeferreddroppedAUs: " & objItem.DeferreddroppedAUs
    Wscript.Echo "DeferredDroppedrowsets: " & objItem.DeferredDroppedrowsets
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "DroppedrowsetcleanupsPersec: " & objItem.DroppedrowsetcleanupsPersec
    Wscript.Echo "DroppedrowsetsskippedPersec: " & objItem.DroppedrowsetsskippedPersec
    Wscript.Echo "ExtentDeallocationsPersec: " & objItem.ExtentDeallocationsPersec
    Wscript.Echo "ExtentsAllocatedPersec: " & objItem.ExtentsAllocatedPersec
    Wscript.Echo "FailedAUcleanupbatchesPersec: " & objItem.FailedAUcleanupbatchesPersec
    Wscript.Echo "Failedleafpagecookie: " & objItem.Failedleafpagecookie
    Wscript.Echo "Failedtreepagecookie: " & objItem.Failedtreepagecookie
    Wscript.Echo "ForwardedRecordsPersec: " & objItem.ForwardedRecordsPersec
    Wscript.Echo "FreeSpacePageFetchesPersec: " & objItem.FreeSpacePageFetchesPersec
    Wscript.Echo "FreeSpaceScansPersec: " & objItem.FreeSpaceScansPersec
    Wscript.Echo "Frequency_Object: " & objItem.Frequency_Object
    Wscript.Echo "Frequency_PerfTime: " & objItem.Frequency_PerfTime
    Wscript.Echo "Frequency_Sys100NS: " & objItem.Frequency_Sys100NS
    Wscript.Echo "FullScansPersec: " & objItem.FullScansPersec
    Wscript.Echo "IndexSearchesPersec: " & objItem.IndexSearchesPersec
    Wscript.Echo "LobHandleCreateCount: " & objItem.LobHandleCreateCount
    Wscript.Echo "LobHandleDestroyCount: " & objItem.LobHandleDestroyCount
    Wscript.Echo "LobSSProviderCreateCount: " & objItem.LobSSProviderCreateCount
    Wscript.Echo "LobSSProviderDestroyCount: " & objItem.LobSSProviderDestroyCount
    Wscript.Echo "LobSSProviderTruncationCount: " & objItem.LobSSProviderTruncationCount
    Wscript.Echo "MixedpageallocationsPersec: " & objItem.MixedpageallocationsPersec
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "PagecompressionattemptsPersec: " & objItem.PagecompressionattemptsPersec
    Wscript.Echo "PageDeallocationsPersec: " & objItem.PageDeallocationsPersec
    Wscript.Echo "PagesAllocatedPersec: " & objItem.PagesAllocatedPersec
    Wscript.Echo "PagescompressedPersec: " & objItem.PagescompressedPersec
    Wscript.Echo "PageSplitsPersec: " & objItem.PageSplitsPersec
    Wscript.Echo "ProbeScansPersec: " & objItem.ProbeScansPersec
    Wscript.Echo "RangeScansPersec: " & objItem.RangeScansPersec
    Wscript.Echo "ScanPointRevalidationsPersec: " & objItem.ScanPointRevalidationsPersec
    Wscript.Echo "SkippedGhostedRecordsPersec: " & objItem.SkippedGhostedRecordsPersec
    Wscript.Echo "TableLockEscalationsPersec: " & objItem.TableLockEscalationsPersec
    Wscript.Echo "Timestamp_Object: " & objItem.Timestamp_Object
    Wscript.Echo "Timestamp_PerfTime: " & objItem.Timestamp_PerfTime
    Wscript.Echo "Timestamp_Sys100NS: " & objItem.Timestamp_Sys100NS
    Wscript.Echo "Usedleafpagecookie: " & objItem.Usedleafpagecookie
    Wscript.Echo "Usedtreepagecookie: " & objItem.Usedtreepagecookie
    Wscript.Echo "WorkfilesCreatedPersec: " & objItem.WorkfilesCreatedPersec
    Wscript.Echo "WorktablesCreatedPersec: " & objItem.WorktablesCreatedPersec
    Wscript.Echo "WorktablesFromCacheRatio: " & objItem.WorktablesFromCacheRatio
Next