Share via


SPSystemPerformanceCounterMonitor Constructor (String, String)

Initializes a new instance of the SPSystemPerformanceCounterMonitor class for the local computer by using the specified category and counter 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 _
)
'Usage
Dim category As String
Dim counter As String

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

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.”

Exceptions

Exception Condition
ArgumentNullException

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

Remarks

Use this constructor when there is only one instance of the counter in the category.

See Also

Reference

SPSystemPerformanceCounterMonitor Class

SPSystemPerformanceCounterMonitor Members

SPSystemPerformanceCounterMonitor Overload

Microsoft.SharePoint.Utilities Namespace