6.17 CLRMemProfile

Use this Knowledge Script to monitor total garbage collection in managedĀ .NET applications.

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.

This script raises an event if the total garbage collection time since the previous collection exceeds a specified percentage.

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.17.1 Default Schedule

The default schedule for this script is Every 5 minutes.

6.17.2 Resource Objects

Managed Applications folder

Managed Applications object

6.17.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 Garbage Collection Time

Event Notification

Raise event if percentage of time spent in garbage collection exceeds threshold?

Set to Yes to raise an event if the percent of time spent in garbage collection exceeds the threshold you set. The default is Yes.

Threshold - Maximum percentage of time spent in garbage collection

Specify the maximum amount of time the application should spend in garbage collection before an event is raised. The default is 6%.

Event severity when garbage collection time exceeds threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the percent of time spent in garbage collection exceeds the threshold. The default is 15 (yellow event indicator).

Data Collection

Collect data for memory profile?

Set to Yes to collect data for charts and reports. When enabled, data collection returns the amount of time spent in garbage collection during the monitoring interval. The default unselected.