XenApp Session Thread Count (Alert)

Comtrade.Citrix.XenApp.Rule.SessionThreadCountConsecutive (Rule)

Monitors the thread count of a session.

Knowledge Base article:


Helps to identify sessions that host applications that are very likely leaking threads, which can potentially lead to unstable/slow session. The name of the user, application, and client IP address are included in the alert details.

Alert is triggered only when thread count is above threshold for specified number of consecutive samples (NumberOfSamples parameter).


The following configuration parameters are customizable:


The recurring interval of time in seconds in which the alert rule is started (the default value is set to 300 seconds). In general this parameter should not be changed. To achieve alert to be triggered after different time than default, update NumberOfSamples parameter.


The threshold value for thread count. Default value is 3000.


Number of consecutive samples considered before generating an alert. Minimum value for this parameter is 2.

For example, set this parameter to 3 if alert should be generated only when thread count is above threshold for 3 consecutive monitoring intervals.


This value must be always set based on NumberOfSamples and IntervalSeconds parameters. Please see the formula below.

Formula for ConsolidationInterval:

ConsolidationInterval = ((NumberOfSamples - 1) * IntervalSeconds ) * 1.1

Example for monitor to generate alert only when monitored value is above threshold for 20 minutes (4 consecutive samples):

IntervalSeconds = 300 (5 minutes) NumberOfSamples = 4 ( 20 minutes / 5 minutes = 4) ConsolidationInterval = ((4 - 1) * 300) * 1.1 = 990

Element properties:

Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Message
XenApp Session Thread Count
Thread count of a session on {0} is above the threshold for multiple consecutive samples.

Thread count: {1}

Session info:

Session name: {2}
Session ID: {3}
User: {4}
Client info: {5}
Client name: {6}
Session type: {7}
Session state: {8}
Applications: {9}

For more information about session see Alert Context section.

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Comtrade.Citrix.XenApp.DS.XenApp.SessionsAlertProviderConsecutive Default
Alert WriteAction System.Health.GenerateAlert Default