Share via


SPSystemPerformanceCounterMonitor Constructor (String, String, String)

Initializes a new instance of the SPSystemPerformanceCounterMonitor class for the local computer by using the specified category, counter, and instance names.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Sub New ( _
    category As String, _
    counter As String, _
    instance As String _
)
'Usage
Dim category As String
Dim counter As String
Dim instance As String

Dim instance As New SPSystemPerformanceCounterMonitor(category, _
    counter, instance)
public SPSystemPerformanceCounterMonitor(
    string category,
    string counter,
    string instance
)

Parameters

  • category
    Type: System.String

    The category of monitor, such as “Processor” or “SharePoint Foundation Search Gatherer.”

  • counter
    Type: System.String

    The name of the particular characteristic that is being measured, such as “% Idle Time” or “Active Queue Length.”

  • instance
    Type: System.String

    The name of the particular instance of the counter.

Exceptions

Exception Condition
ArgumentNullException

Either category or counter is a null reference (Nothing in Visual Basic).

Remarks

If there is only one instance of the counter in the specified category, either or pass a null reference (Nothing in Visual Basic) or an empty string for instance or use the SPSystemPerformanceCounterMonitor(String, String) constructor.

See Also

Reference

SPSystemPerformanceCounterMonitor Class

SPSystemPerformanceCounterMonitor Members

SPSystemPerformanceCounterMonitor Overload

Microsoft.SharePoint.Utilities Namespace