 |
» |
|
|
 |
The JMX viewer provides access to data collected from the operation
of JMX servers inside the Java Virtual Machine for Java 1.5x versions. The viewer also provides you with the ability to interject in some operations
of the JVM and to manipulate the operation and attributes of Mbeans that you
have defined. Using HPjmeter monitoring
displays, you can observe the effect of changing the characteristics of Mbeans that you have
loaded into the JMX server of the virtual machine. Opening the JMX viewer. On opening a session
with an application running on Java 1.5x, a data node displays in the main
console to represent current data collected from the JVM. To access this data
and to manipulate some JVM and Mbean functions, double-click on the JMX server
node. The JMX viewer opens with current information from the session.  |  |  |  |  | NOTE: This functionality is available only during an open session. No record
of the actions taken within the JMX viewer are saved. To preserve a record
of changes occurring in the application run due to manipulation of the JMX
server and MXbeans, save the
monitoring session data for later review. Use the monitoring metric visualizers to view the saved data. |  |  |  |  |
See also Understanding the JMX Summary View |  |
The JMX viewer opens in the Summary view with five tabs displayed: The Summary tab shows a collection of data about the operating system
and hardware, allocated memory, current heap usage, and class loading status.
Values are updated throughout the duration of the open session. Fluctuations in memory usage in heap and non-heap areas are graphically
displayed and periodically updated for the duration of the open session. Mouse
over the features of the graph to learn what spaces are represented, as well
as to learn what each of the markers designates. The following image demonstrates some of the features available on this
tab. Select
a region of interest. Click the color bar in the graph to select
the memory space of interest. The bar will become outlined in blue and the
region details will update in the text area.
Consult the “Region Details” for updated information on
memory usage in that region, total count of garbage collections, and cumulative
duration of GC events. Set
a usage threshold. Where usage threshold can be set, a “0”
(zero) appears in the Usage Threshold box. To set a threshold, replace the
current value with a desired, valid value in the box, and press Enter.
To see what values are valid for a region, mouse over the Usage Threshold
box.
On pressing Enter, a red marker will appear on the
region usage bar to mark the point at which the threshold is reached. The
bar color turns red when the threshold is reached and a notification is generated. Start
verbose GC. At any point, you can click the verbose GC check box
to start collection of verbose GC data by the JVM. Access this data through
the logs that you would normally use. Uncheck the box to stop logging verbose
GC data.
Perform
a garbage collection. At any point, you can click the Perform
GC button to force a full garbage collection on the heap.
HPjmeter finds and tracks the live threads processing during the application
run. This image shows available functions on the Threads tab. See
the list of live threads. Pull the slider in the data pane to
the right to reveal the current list of live threads.
See
details for a selected thread. Click a thread name in the left
pane. Details on thread activity and current state appear in the right pane.
Apply
a filter. This filtering text box is useful when the thread list
is long. It allows you to reduce the list size according to the starting letters
of the thread name. To apply a filter, start typing the first few distinguishing
letters of the thread names that you are interested in. The list will immediately
be trimmed to entries starting with those letters. Deleting text from the
filter box returns the list to its original state.
Detect
thread deadlock. At any point, you can check the box for “Detect
Deadlock” to start monitoring specifically for thread deadlock conditions.
When a deadlock condition is encountered for a particular thread, the text
of the thread name turns red. Un-check the box to stop watching for this condition.
The Runtime tab summarizes important characteristics
of the runtime environment, including data on the JVM version and uptime,
options used to start the monitoring agent, and some aspects of the hardware
and operating system such as memory assignment, swap space, and operating
system type and version. Notifications triggered by changes that you make using the JMX viewer
appear on the Notifications tab. They are available for
viewing for the duration of the open session or until you clear them from
the screen using the Clear All button. See also The Mbean Notification Tab Understanding the JMX Server View |  |
Press the toggle button below the menu bar to swap between the
JMX summary view and the JMX server view. Use the JMX server view to select
the Mbeans that you want to look at in detail. The following image shows the
default view on toggling to the JMX server view. An explanation follows the
image. JMX
Mbean list filter. Click this button to see a list
of the filters that you can apply to the Mbean drop-down menu items
at .
JMX
server drop-down menu. The server from which this JMX viewer was
launched is shown in the “JMX Servers” drop-down menu.
JMX
Mbean drop-down menu. This drop-down menu lists the viewable Mbeans
for which data can be displayed in the viewer. This list can get quite long
when viewing data for application servers. To reduce the list length in the
drop-down menu, click the Mbean filter button at .
JMX
Mbean tab navigation. Select an Mbean, and the data for that bean
is displayed in the four tabs appearing immediately below the drop-down menus.
Click among the tabs to looks at various aspects of the selected Mbean. Four
tabs are available in the JMX server view: Attributes, Operations, Notifications, and Information.
JMX
Mbean Details Viewer. In the Details Viewer, you can drill down
into the Mbean data for details or to force an operation.
Using the Functions in the JMX Server View |  |
The following discussion touches on the basic functions in this area
of the JMX viewer. Click the Mbean filter button to select a subset of Mbeans
to populate the Mbean drop-down menu. A small window opens that gives you the following options for sorting
the Mbeans: by domain (for example, java.lang, com.bea) by name (for example, ClassLoadingImpl, MBeanServerDelegate) by type (for example,GarbageCollector, MemoryPool)
Select the filter type that you want, and click the Apply
Filter button. Use the Mbean drop-down menu to see the resulting list and to select
an Mbean to view. The Attribute tab lists the contents of the selected
Mbean. In general, two actions are possible at this level: drill down to see
values of an attribute and change the value of an attribute. The following
image shows an example. An explanation follows the image. List
of name/value pairs found in the selected Mbean. The names are
listed with their value. Values may be dynamically updating, you may open
them to reveal further details as in , or you may edit them as in .
Clickable
value. Names or values appearing in boldface type can be opened
to display details in the Detail Viewer area. Double-click the boldface text
to open a tab in the Detail Viewer as in . The tab remains open until you click the closure box
on the tab or until you close the viewer.
Editable
value. Values appearing in blue type can be changed. Click the
blue text to open a text box. Type the change, and press Enter to
immediately apply the change. To view the effect of the change, choose an
appropriate monitoring metric.
Detail
Viewer tab. Opens when boldface values are double-clicked. Tabs
appearing in this area provide additional data or operations that you can
modify and immediately apply. The detail tab remains available until you click
the closure box on the tab or until you close the viewer.
Not all Mbeans have operations associated with them. This tab is greyed
out when the selected Mbean has no operation associated with it. The next
figure shows an open Operations tab with details about a particular Mbean.
An explanation follows the image. Selected
Operation Name. The names are listed with their return type and
number of arguments. By double-clicking a boldface name, the return type is
highlighted and a tab opens in the Detail Viewer containing the operation
and one or more editable text boxes. See and .
Operational
detail tab. The detail tab remains available until you click the
closure box on the tab or until you close the viewer.
Editable
text box. Values appearing in text box can be changed. Type the
change, and press the Operation_Name button
to immediately apply the operational change. In this example, the operational
button name is getThreadCpuTime . To view the effect
of the change, choose an appropriate monitoring
metric.
The Mbean Notification TabNot all Mbeans have notifications associated with them. This tab is
greyed out when this information is not present. The next figure shows an
open Notification tab with details about the selected Mbean. An explanation
follows the image. Enable
or disable notification. Click the check box to enable or disable
the notification.
Notification
detail tab. When the conditions for the notification are triggered,
messages resulting from the event appear here. The detail tab remains available
until you click the closure box on the tab or until you close the viewer.
The Mbean Information Tab The next figure shows an open Information tab with additional related
information about the selected Mbean. An explanation follows the image. View
classification information. Name/Value pairs are given that provide
relational information for the selected Mbean.
|