HP

HPjmeter 4.1 User's Guide

English
  HPjmeter 4.1 User's Guide > Chapter 7 Using the Console   

Using Alerts

The console provides a way for you to enable and disable alerts for specific events when monitoring an application. Enabled alerts can be deactivated and reactivated during the session as needed by using the Alert Controller. In addition, you can set thresholds in the Alert Controller to vary the sensitivity of the console to enabled alert conditions, and you can edit e-mail notification attributes submitted when you set session preferences.

When active alerts are triggered, a notification appears in the main pane of the console window, and the alert type and threshold value are displayed on all relevant metric visualizers. To view details about the application behavior that triggered the notification, double-click on the specific alert that you want to see. A metric window associated with the alert will open, with the alert type and its threshold value displayed at the bottom of the window. For example, if you enabled GC Duration (Major) and GC Duration (Minor) alerts, and the alerts were triggered, the GC Duration visualizer might look something like this:

Figure 7-6 Appearance of Alert Threshold in GC Duration Visualizer

Appearance of Alert Threshold in GC Duration Visualizer

If you disable the alert in the Alert Controller, that alert and its threshold value are removed from all relevent visualizers. For example, disabling the GC Duration (Minor) alert will then remove it from the GC Duration visualizer:

Figure 7-7 GC Duration (Minor) alert Removed from GC Duration Visualizer

GC Duration (Minor) alert Removed from GC Duration Visualizer

See “Responding to Alerts” for information on specific alert notifications.

The console displays an alert while the alert condition exists, and stops displaying when the alert condition no longer exists.

A displayed alert may also stop displaying when HPjmeter recalculates the alert based on real-time information.

The console displays a warning icon in the lower right corner of the window showing the current number of alerts detected.

Using the Alert Controller

To open the Alert Controller, double-click on an Alerts counter row in the data tree.

Figure 7-8 Appearance of Alert Notices in the Main Console Pane

Appearance of Alert Notices in the Main Console Pane

In the Controller, you can see all alerts enabled for that session. Some are turned on by default; others must be turned on in the Alert Controller.

NOTE: If you disabled specific alerts when you set your session preferences, information for those alerts will not be available in the Alert Controller or the main console pane. To re-enable those alerts, you must enable the alert in the session preferences for that session.

Figure 7-9 Alert Controller Window

Alert Controller Window

You can use the Alert Controller in these ways:

Deactivate or reactivate enabled alerts.  To deactivate or reactivate alerts once a session has started, use the check box next to the alert name.

  • When you deactivate an alert, the console stops reporting that alert to the console main pane. Note that a record of the alert activity up to that point has been written into a log file for reference.

  • Remember that you can only deactivate or reactivate alerts that are enabled in Session Preferences.

Open the Session Preferences window to enable/disable alerts.:

With HPjmeter 4.0 and later, you can click Preferences on the Alert Controller to open the Session Preferences window. The window opens with the Alerts tab selected. There, you can change the settings selected when the session started. For more information, see Setting Monitoring Session Preferences .

When done changing Session Preferences, the Alert Controller will refresh with the new information. Make any alterations needed in the Alert Controller for newly enabled alerts.

Set alert thresholds.  You can use default settings or set values for enabled alerts. For each alert enabled, you can select a numerical threshold and a time constraint. The alert is triggered when the threshold is passed for the duration of the allotted time.

For example, if you are setting values for Heap Usage Notification, and you choose ≥ 50 MB and a time constraint of 60 seconds, the alert will trigger when the heap usage in the application exceeds the 50 MB threshold for at least 60 seconds. A notification appears in the console main panel for as long as the threshold is crossed, periodically updating to show the current value of the heap usage.

New values for alerts are applied immediately when you select Apply.

Viewing a Log of the Alert History

From the Alert Controller, select the Alert Log button to see a history of alerts noted during the monitoring session.

Figure 7-10 Example Alert Log

Example Alert Log

Change the alert log capacity.  From the Alert Log window, click the “Select Log Capacity” icon to open the log capacity window. Change the value as desired for number of lines to include in the log.

Editing E-mail Notification Attributes

From the Alert Controller, click Edit Notification to see the Alert Notification Editor and the settings you entered for this monitoring session.

Figure 7-11 Example Alert Notification Editor

Example Alert Notification Editor

The following table explains available options.

Table 7-6 E-mail Notification Fields and Options for Receiving Alerts

Fields/OptionsExpected Attribute ValuesDescription
SMTP E-mail Server:Correctly constructed host name of a valid SMTP server that allows connection without authentication.To locate the desired mail server
From:HP provides a default HPjmeter address; however, this field can be edited to enter an alternative addressTo provide an identifiable and memorable address that distinguishes HPjmeter alerts from other e-mail
To:Valid user or distribution list e-mail address; one or more addresses can be entered; use a comma-separated list for multiple addresses.To send e-mail alerts to intended receiver(s)
Activate e-mail notificationClick box to turn on or offOff by default. Check mark indicates e-mail notification is on.
Send all status changes corresponding to an enabled alertClick box to turn on or offOff by default; operative only when e-mail notification is activated. When this setting is off, only the first occurrence of an alert event will be sent in e-mail. A check mark on this option indicates that notification will be sent every time an alert is activated during a session.

 

The following table explains the button controls in the Alert Notification Editor.

Table 7-7 Alert Notification Editor Controls

ControlsDescription
SaveSaves and applies changes to attributes and options for the duration of the monitoring session.
Send TestTests that the e-mail function is working; sends a test e-mail to the To: address designated in the editor.
CancelCancels the editing of the alert notification settings; previous settings are still in effect.
HelpOpens HPjmeter help to the beginning of this help topic.

 

Notification for a session ends when the monitoring session is closed.

Responding to Alerts

Alerts are automatically posted to the main console in the appropriate data tree, and if set, they are also sent to an email address. To investigate the alert further, double-click on the individual alert listed in the data tree in the main console window to open a window containing metric information for that particular alert.

The following information is specific for each alert type.

Abnormal Thread Termination Alert

HPjmeter detects threads that terminate abnormally because of an uncaught exception.

By default, when HPjmeter detects that one thread (or more) terminated abnormally, the console main window displays an Abnormal Thread Termination Alert.

Double-clicking on the alert in the main window displays the uncaught exception window. The window shows:

  • Thread name

  • Exception

  • Source location where the exception was thrown

Figure 7-12 Abnormal Thread Termination Alert Visualizer

Abnormal Thread Termination Alert Visualizer

You can use this information to debug the cause of the exception. For example, each row in the Abnormal Thread Termination window represents a thread in the Thread Histogram window.

You can open the Thread Histogram metric, and notice that when a thread terminates, the associated bar in the Thread Histogram display is shorter than the others. Note that the thread histogram does not distinguish between threads that terminate normally or abnormally.

Symptoms that an application might show if it has abnormally terminating threads include:

  • Poor application response.

    If worker threads terminate, then the application might continue to work, but at a reduced speed.

  • The entire application terminates.

    Usually the application itself does not terminate as the result of one thread dying. However, it is possible that the entire application might eventually terminate if it cannot handle the loss of a thread.

See also:

Uncaught Exception Statistics

These statistics are derived from more than one metric.

The Uncaught Exception Statistics display shows you:

  • Thread name

  • Type of Exception

  • Time thrown, as the time from the start of the application

  • Throw point as a subentry

The window shows events in a hierarchical tree.

  • Select the View->Show Packages menu item to alternatively hide or show the Java package names to shorten the lines in the display.

  • Select the View->Show Stacktraces menu item to alternatively expand or collapse the thrown stack traces of all the exception nodes, or click on a specific node to expand or collapse its thrown stack trace only.

The results are cumulative over the life time of the session.

See also:

Excessive Compilation Alert

By default, HPjmeter detects when one method (or more) is repeatedly compiled.

Double-click on the Excessive Compilation alert to display the metrics for excessive method compilation.

See also: Identifying Excessive Method Compilation .

Expected Out Of Memory Error Alert

HPjmeter detects memory leaks automatically and reports an alert before a crash occurs. By default, this alert activates when memory use increases by a rate of 10 MB/hr.

Double-click on the alert to open the Heap Monitor display.

The heuristic algorithms for alert triggers are tuned for server-oriented applications. The alerts are based on heuristic algorithms and are not offered with 100 percent certainty. Fluctuations in the application load may cause a transient increase in memory usage.

To confirm the leak, monitor the application for one hour or longer; then review the Garbage Collections metrics.

See also:

GC Duration Notification

Set this threshold when you suspect that the duration of garbage collections exceeds or is significantly less than what is reasonable for the application heap size.

The Alert Controller displays this alert threshold differently depending on the Java version run with the application.

Table 7-8 GC Duration Notification Display by Java Version

Java VersionMetric NameDefault Alert Threshold
HP 1.4.2.02 or later 1.4.x versionsGC Duration> 2000 milliseconds (2 seconds)
HP 1.5.0.12 or 6.0.01 or later GC Duration (Major)> 30 seconds
HP 1.5.0.12 or 6.0.01 or later GC Duration (Minor)> 2000 milliseconds

 

Double-click on the alert to display the GC Duration Notification visualizer.

See also:

Heap Usage Notification

It can be useful to change the heap usage threshold in order to observe the heap structure at the selected usage point.

You can also set this threshold to notify you when heap usage exceeds your maximum or minimum expectations for the application.

By default, this notification is enabled in Session Preferences, but is turned off in the Alert Controller until you turn it on. Once turned on, this alert activates when heap usage reaches the default value of 10 MB or more .

For example, if you expect that your application should never consume more than 100 MB of heap for a target period of time, set the threshold fields for heap size and time sustained, and check that the alert is enabled. If the set values are exceeded, an alert is generated and recorded in the alert log. An alert notice is posted on the console.

Double-click on the alert to display the Heap Monitor. In this visualizer, you can see the memory allocated to the heap compared to usage over time, and including indicators for garbage collection events and their duration.

See also:

Java Collection Leak Locations Alert

HPjmeter detects potential Java collection memory leaks and identifies the source-file line of the leak. By default, this alert is activated when the leak is 10 MB/hour or more.

The console main window displays a Java Collection Leak Locations Alert when a Java collection class memory leak is detected.

Double-clicking on the alert displays the Java Collection Leak Locations visualizer, which shows:

  • Each detected Java collection leak object type

  • The leak source location

  • The leak duration

  • The current size of the collection object

Mouse over the location entry to see an explanatory tool tip.

Figure 7-13 Java Collection Leak Locations Visualizer

Java Collection Leak Locations Visualizer

After some time, the alert icon may disappear if:

  • HPjmeter determines that the previously reported leak object is not a leak.

  • The leak-related collection object is removed by garbage collection.

HPjmeter removes the alert icon when it removes all the leak nodes and no new memory leak is detected.

NOTE: This alert is not available when dynamically attaching to a running Java application.

See also:

Array Leak Locations Alert

HPjmeter detects potential array memory leaks and identifies the source-file line of the leak. By default, this alert is activated when the leak is 10 MB/hour or more.

The console main window displays an Array Leak Locations Alert when an array memory leak is detected.

Double-clicking on the alert displays the Array Leak Locations visualizer, which shows:

  • Each detected array leak type

  • The leak source location

  • The leak duration

  • The current size of the detected array

Mousing over an array leak alert pops up a yellow description box with explanatory text.

Figure 7-14 Array Leak Locations Visualizer

Array Leak Locations Visualizer

After some time, the alert icon may disappear if:

  • HPjmeter determines that the previously reported leak object is not a leak.

  • The leak-related array is removed by garbage collection.

HPjmeter removes the alert icon when it removes all the leak nodes and no new memory leak is detected.

NOTE: This alert is not available when dynamically attaching to a running Java application.

See also:

Process CPU Usage Alert

Enable this alert to track target levels of process CPU usage. Significant variance from target levels may indicate the presence of performance bottlenecks. Bottlenecks are caused by thread starvation that occurs when the application is using all available CPU resources or when processes other than your application are using the available CPU resources.

By default, this notification is enabled in Session Preferences, but is turned off in the Alert Controller until you turn it on. Once turned on, this alert activates when process CPU usage reaches the set value. The default value is 50 percent of 1 CPU.

Procedure 7-4 To Set the Process CPU Usage Alert

  1. Connect to the server, and click the appropriate check box to enable the Process CPU Usage Alert on the Alert tab in the Set Preferences window.

  2. Once connected to the JVM, open the Alert Controller.

  3. Scroll down if needed to see the Process CPU Usage Alert. Check this box also to turn this alert on.

  4. Set the usage threshold to reflect the expected consumption and designate a duration, if desired.

  5. Click Apply to activate checking for this threshold.

When the set threshold is met, an alert notice is posted on the console.

Double-click on the console alert to display the Percent CPU Utilization visualizer. In this visualizer, you can see system and process CPU usage during the period of the monitoring session plotted against the known resources of the server.

As an example, assume that you have a 4-CPU system, and you expect your Java application to consume at least 1.5 CPU.

HPjmeter presents CPU utilization percentages as the number of CPUs x 100 to arrive at the total possible percent of use. Therefore, expected use of 1.5 CPU would be equal to or greater than 150% of 1 CPU out of a total of 4 available CPU. By applying this value (150%) in the Alert Controller, HPjmeter notifies you when that value is exceeded during the monitoring session. A notification is generated for display on the console and recorded in the alert log.

Conversely, if you expect that your application will always use at least 100% of 1 CPU, set the operator at less than or equal to 100% to trigger a notification that the application is not consuming resources as expected.

For more information, see also:

System CPU Usage Alert

This alert measures overall CPU usage for the entire system, not time spent in the system processor state. Enable this alert to track target levels of system-level CPU usage. Significant variance from target levels may indicate over- or under-utilization of system resources.

By default, this notification is enabled in Session Preferences, but is turned off in the Alert Controller until you turn it on. Once turned on, this alert activates when system CPU utilization reaches the set value. The default value is 50 percent of 1 CPU.

Procedure 7-5 To Set the System CPU Usage Alert

  1. Connect to the server, and click the appropriate check box to enable the System CPU Usage Alert on the Alert tab in the Set Preferences window.

  2. Once connected to the JVM, open the Alert Controller.

  3. Scroll down if needed to see the System CPU Usage Alert. Check this box also to turn this alert on.

  4. Set the utilization threshold to reflect the consumption threshold and designate a duration, if desired.

  5. Click Apply to activate checking for this threshold.

When the set threshold is met, an alert notice is posted on the console.

Double-click on the console alert to display the Percent CPU Utilization visualizer. In this visualizer, you can see system and process CPU usage during the period of the monitoring session plotted against the known resources of the server.

As an example, assume that you have a 4-CPU system, and you expect your Java application to consume no more than 3 CPU over any 5–minute period.

HPjmeter presents CPU utilization percentages as the number of CPUs x 100 to arrive at the total possible percent of use. Therefore, maximum use of 3 CPU would be equal to or greater than 300% of 1 CPU out of a total of 4 available CPU. By applying this value (300%) for a 5–minute duration in the Alert Controller, HPjmeter notifies you each time that value is exceeded for 5 minutes during the monitoring session. A notification is generated for display on the console and recorded in the alert log.

Conversely, if you expect that your application will always use at least 100% of 1 CPU, set the operator at less than or equal to 100% to trigger a notification that the application is not consuming resources as expected.

For more information, see also:

Thread Deadlock Alert

By default, this alert is activated when two or more threads are attempting to acquire Java locks that have been acquired already by a set of threads.

Double-click the alert to display the thread histogram window. This allows you to determine which threads are deadlocked.

Deadlocked threads represent a multi-threaded program error.

An application experiencing a deadlock may not crash, but it is unresponsive to requests.

If the alert persists, it suggests a problem in the application logic that will need to be addressed by developers.

See also:

Unfinalized Queue Growth

This alert activates when the average finalizer queue length in a 5–minute period exceeds the value set in the Alert Controller. The default setting for this alert is 5000 objects.

Double-click the alert in the console to open the Unfinalized Queue Growth visualizer.

See Unfinalized Objects for information on how to interpret the data presented in this visualizer.