Use this Knowledge Script to monitor the thread contention rate and thread queue length in managedĀ .NET applications.
This script raises an event if one of the following conditions exists:
The contention rate (in seconds) exceeds a specified threshold. Contention occurs when numerous threads compete unsuccessfully to acquire managed locks at run time.
The thread queue length exceeds a specified threshold. Thread queue length is a measurement of all threads that are waiting to acquire a managed lock on an application.
NOTE:The monitored .NET applications must be running at the time of discovery so their resource objects can discovered. The applications must also be running for this script to collect data.
The default schedule for this script is Every 5 minutes.
Managed Applications folder
Managed Applications object
Set the following parameters as needed:
Parameter |
How to Set It |
---|---|
General Settings |
|
Raise event if application not running? |
Set to Yes to raise an event if the managed application is not running. The default is Yes. |
Event severity when application not running |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the managed application is not running. The default is 20 (yellow event indicator). |
Monitor Contention Rate |
|
Event Notification |
|
Raise event if contention rate exceeds threshold? |
Set to Yes to raise an event if the contention rate exceeds the threshold you set. The default is Yes. |
Threshold - Maximum contention rate |
Specify the maximum number of contentions that can occur per second before an event is raised. The default is one contention per second. |
Event severity when contention rate exceeds threshold |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the contention rate exceeds the threshold. The default is 15 (yellow event indicator). |
Data Collection |
|
Collect data for contention rate? |
Set to Yes to collect data for charts and reports. When enabled, data collection returns the contention rate for the monitoring interval. The default is unselected. |
Monitor Thread Queue Length |
|
Event Notification |
|
Raise event if thread queue length exceeds threshold? |
Set to Yes to raise an event if the thread queue length exceeds the threshold you set. The default is Yes. |
Threshold - Maximum thread queue length |
Specify the maximum number of threads that can be in the queue before an event is raised. The default is 10 threads. |
Event severity when thread queue length exceeds threshold |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of threads in the queue exceeds the threshold. The default is 15 (yellow event indicator). |
Data Collection |
|
Collect data for thread queue length? |
Set to Yes to collect data for charts and reports. When enabled, data collection returns the number of threads in queue during the monitoring interval. The default is unselected. |