Win32_PerfRawData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSBrokerStatistics 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_PerfRawData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSBrokerStatistics 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_PerfRawData_MSSQLSQLEXPRESS_MSSQLSQLEXPRESSBrokerStatistics",,48) For Each objItem in colItems Wscript.Echo "ActivationErrorsTotal: " & objItem.ActivationErrorsTotal Wscript.Echo "BrokerTransactionRollbacks: " & objItem.BrokerTransactionRollbacks Wscript.Echo "Caption: " & objItem.Caption Wscript.Echo "CorruptedMessagesTotal: " & objItem.CorruptedMessagesTotal Wscript.Echo "DequeuedTransmissionQMsgsPersec: " & objItem.DequeuedTransmissionQMsgsPersec Wscript.Echo "Description: " & objItem.Description Wscript.Echo "DialogTimerEventCount: " & objItem.DialogTimerEventCount Wscript.Echo "DroppedMessagesTotal: " & objItem.DroppedMessagesTotal Wscript.Echo "EnqueuedLocalMessagesPersec: " & objItem.EnqueuedLocalMessagesPersec Wscript.Echo "EnqueuedLocalMessagesTotal: " & objItem.EnqueuedLocalMessagesTotal Wscript.Echo "EnqueuedMessagesPersec: " & objItem.EnqueuedMessagesPersec Wscript.Echo "EnqueuedMessagesTotal: " & objItem.EnqueuedMessagesTotal Wscript.Echo "EnqueuedP10MessagesPersec: " & objItem.EnqueuedP10MessagesPersec Wscript.Echo "EnqueuedP1MessagesPersec: " & objItem.EnqueuedP1MessagesPersec Wscript.Echo "EnqueuedP2MessagesPersec: " & objItem.EnqueuedP2MessagesPersec Wscript.Echo "EnqueuedP3MessagesPersec: " & objItem.EnqueuedP3MessagesPersec Wscript.Echo "EnqueuedP4MessagesPersec: " & objItem.EnqueuedP4MessagesPersec Wscript.Echo "EnqueuedP5MessagesPersec: " & objItem.EnqueuedP5MessagesPersec Wscript.Echo "EnqueuedP6MessagesPersec: " & objItem.EnqueuedP6MessagesPersec Wscript.Echo "EnqueuedP7MessagesPersec: " & objItem.EnqueuedP7MessagesPersec Wscript.Echo "EnqueuedP8MessagesPersec: " & objItem.EnqueuedP8MessagesPersec Wscript.Echo "EnqueuedP9MessagesPersec: " & objItem.EnqueuedP9MessagesPersec Wscript.Echo "EnqueuedTransmissionQMsgsPersec: " & objItem.EnqueuedTransmissionQMsgsPersec Wscript.Echo "EnqueuedTransportMsgFragsPersec: " & objItem.EnqueuedTransportMsgFragsPersec Wscript.Echo "EnqueuedTransportMsgFragTot: " & objItem.EnqueuedTransportMsgFragTot Wscript.Echo "EnqueuedTransportMsgsPersec: " & objItem.EnqueuedTransportMsgsPersec Wscript.Echo "EnqueuedTransportMsgsTotal: " & objItem.EnqueuedTransportMsgsTotal Wscript.Echo "ForwardedMessagesPersec: " & objItem.ForwardedMessagesPersec Wscript.Echo "ForwardedMessagesTotal: " & objItem.ForwardedMessagesTotal Wscript.Echo "ForwardedMsgBytesPersec: " & objItem.ForwardedMsgBytesPersec Wscript.Echo "ForwardedMsgByteTotal: " & objItem.ForwardedMsgByteTotal Wscript.Echo "ForwardedMsgDiscardedTotal: " & objItem.ForwardedMsgDiscardedTotal Wscript.Echo "ForwardedMsgsDiscardedPersec: " & objItem.ForwardedMsgsDiscardedPersec Wscript.Echo "ForwardedPendingMsgBytes: " & objItem.ForwardedPendingMsgBytes Wscript.Echo "ForwardedPendingMsgCount: " & objItem.ForwardedPendingMsgCount Wscript.Echo "Frequency_Object: " & objItem.Frequency_Object Wscript.Echo "Frequency_PerfTime: " & objItem.Frequency_PerfTime Wscript.Echo "Frequency_Sys100NS: " & objItem.Frequency_Sys100NS Wscript.Echo "Name: " & objItem.Name Wscript.Echo "SQLRECEIVEsPersec: " & objItem.SQLRECEIVEsPersec Wscript.Echo "SQLRECEIVETotal: " & objItem.SQLRECEIVETotal Wscript.Echo "SQLSENDsPersec: " & objItem.SQLSENDsPersec Wscript.Echo "SQLSENDTotal: " & objItem.SQLSENDTotal Wscript.Echo "Timestamp_Object: " & objItem.Timestamp_Object Wscript.Echo "Timestamp_PerfTime: " & objItem.Timestamp_PerfTime Wscript.Echo "Timestamp_Sys100NS: " & objItem.Timestamp_Sys100NS Next