VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Exchange 2000 monitor function - this code was copied from the ActiveXperts Network Monitor applica

by Anonymous (267 Submissions)
Category: Windows System Services
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Sun 4th May 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Exchange 2000 monitor function - this code was copied from the ActiveXperts Network Monitor application. It uses vbscript to monitor Exchange

Rate Exchange 2000 monitor function - this code was copied from the ActiveXperts Network Monitor applica



Function Check_Num_RPC_Requests( strComputer, numMaxRequests )
' This function checks if RPC requests currently being processed 
' by the store is not exceeding numMaxRequests.
' You should expect this figure to be fairly small, typically below 25. 
' If it is consistently higher than this, your server is overloaded.  
' NOTE: There's only 1 Information Store for each Exchange Server

On Error Resume Next

    Dim objWMIService, nMax, strComputerObject, colIS, o

    nMax = 0
    Set objWMIService = GetObject( "winmgmts://" & strComputer )
    If( Err.Number <> 0 ) Then
Check_Num_RPC_Requests = retvalUnknown
EXPLANATION = "Unable to access '" & strComputer & "'. Possible reasons: no WMI installed on the remote server, no rights to access remote WMI service, or remote server down"
Exit Function
    End If

    Set colIS = objWMIService.InstancesOf( "Win32_PerfRawData_MSExchangeIS_MSExchangeIS" )

    For Each o in colIS
        If( Err.Number <> 0 ) Then
    Check_Num_RPC_Requests = retvalUnknown
    EXPLANATION = "Unable to list mailboxes"
    Exit Function
        End If
        nMax = o.RPCRequests
    Next

    If( nMax > numMaxRequests ) Then
        EXPLANATION = "RPC requests exceed " & numMaxRequests
        Check_Num_RPC_Requests = False
    Else
        EXPLANATION = "RPC requests less or equal than " & numMaxRequests
        Check_Num_RPC_Requests = True      
    End If

End Function

Download this snippet    Add to My Saved Code

Exchange 2000 monitor function - this code was copied from the ActiveXperts Network Monitor applica Comments

No comments have been posted about Exchange 2000 monitor function - this code was copied from the ActiveXperts Network Monitor applica. Why not be the first to post a comment about Exchange 2000 monitor function - this code was copied from the ActiveXperts Network Monitor applica.

Post your comment

Subject:
Message:
0/1000 characters