6.15 CLRHeap

Use this Knowledge Script to monitor heap memory use in managedĀ .NET applications.

This script raises an event if one of the following occurs:

  • Full garbage collection levels have changed. Total garbage collection frees memory slots in sections of unused memory and is composed of partial garbage collection (where memory freeing processes can be interrupted) and full garbage collection (where memory freeing processes cannot be interrupted). In partial garbage collection, only the most recently allocated objects (Gen 0 objects) are counted. In full garbage collection, older objects (Gen 1 and up) are counted.

  • Special heap memory use is greater than a specified percentage of the total garbage collection heap. In some cases, garbage collection software allocates large objects (>20 KB) directly to an area in memory known as the special heap, bypassing generation object promotion.

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.

6.15.1 Default Schedule

The default schedule for this script is Every 5 minutes.

6.15.2 Resource Objects

Managed Applications folder

Managed Applications object

6.15.3 Setting Parameter Values

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 heap memory usage

Event Notification

Raise event if special heap size exceeds threshold?

Set to Yes to raise an event if the special heap size exceeds the threshold you set. The default is Yes.

Threshold - Maximum size of special heap (asĀ % of garbage heap)

Specify the maximum size of the special heap (as a percentage of the total heap) that can occur before an event is raised. The default is 80%.

Total heap is the number of bytes in all heaps.

Event severity when size of special heap exceeds threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the size of the special heap exceeds the threshold. The default is 15 (yellow event indicator).

Data Collection

Collect data for total heap size?

Set to Yes to collect data for charts and reports. When enabled, data collection returns the size of the total heap during the monitoring interval. The default is unselected.

Monitor Full Garbage Collection

Event Notification

Raise event if frequency of full garbage collection changes?

Set to Yes to raise an event if the number of full garbage collections has changed since the last time the script ran. The default is Yes.

Event severity when full garbage collection frequency changes

Set the event an event in which the number of full garbage collections has changed. The default is 15 (yellow event indicator).