Contact Info

Crumbtrail

ActiveXperts.com » Administration » Scripts » Adsi

Monitor MSDTC Distributed Transaction Coordinator Performance in Windows

You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.

Monitor MSDTC Distributed Transaction Coordinator Performance in Windows using VBScript, WMI and LDAP

Example(s)

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
set objRefresher = CreateObject("WbemScripting.SWbemRefresher")
Set colItems = objRefresher.AddEnum(objWMIService," & _
    "Win32_PerfFormattedData_MSDTC_DistributedTransactionCoordinator"). _
        objectSet
objRefresher.Refresh

For i = 1 to 5
    For Each objItem in colItems
        Wscript.Echo "Aborted Transactions: " & objItem.AbortedTransactions
        Wscript.Echo "Aborted Transactions Per Second: " & _
            objItem.AbortedTransactionsPersec
        Wscript.Echo "Active Transactions: " & objItem.ActiveTransactions
        Wscript.Echo "Active Transactions Maximum: " & _
            objItem.ActiveTransactionsMaximum
        Wscript.Echo "Caption: " & objItem.Caption
        Wscript.Echo "Committed Transactions: " & objItem.CommittedTransactions
        Wscript.Echo "Committed Transactions Per Second: " & _
            objItem.CommittedTransactionsPersec
        Wscript.Echo "Description: " & objItem.Description
        Wscript.Echo "Force Aborted Transactions: " & _
            objItem.ForceAbortedTransactions
        Wscript.Echo "Force Committed Transactions: " & _
            objItem.ForceCommittedTransactions
        Wscript.Echo "In-Doubt Transactions: " & objItem.InDoubtTransactions
        Wscript.Echo "Name: " & objItem.Name
        Wscript.Echo "Response Time Average: " & objItem.ResponseTimeAverage
        Wscript.Echo "Response Time Maximum: " & objItem.ResponseTimeMaximum
        Wscript.Echo "Response Time Minimum: " & objItem.ResponseTimeMinimum
        Wscript.Echo "Transactions Per Second: " & objItem.TransactionsPersec
        Wscript.Sleep 2000
        objRefresher.Refresh
    Next
Next