Using the Alert Controller |
 |
To open the Alert Controller, double-click on an Alerts counter row in the data tree.
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. |
 |
 |  |
 |
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.
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.
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.
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:
Source location where the exception was thrown
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:
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:
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 Version | Metric Name | Default Alert Threshold |
|---|
| HP 1.4.2.02 or later 1.4.x versions | GC 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:
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 current size of the
collection object
Mouse over the location entry to see an explanatory
tool tip.
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 current size of the detected array
Mousing over an array leak alert pops up a yellow description
box with explanatory text.
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:
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
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.
Once connected to the JVM,
open the Alert Controller.
Scroll
down if needed to see the Process CPU Usage Alert. Check this box
also to turn this alert on.
Set the usage threshold to
reflect the expected consumption and designate a duration, if desired.
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:
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
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.
Once connected to the JVM,
open the Alert Controller.
Scroll
down if needed to see the System CPU Usage Alert. Check this box also
to turn this alert on.
Set the utilization threshold
to reflect the consumption threshold and designate a duration, if
desired.
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:
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:
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.