JMX For Monitoring and Maintenance - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

JMX For Monitoring and Maintenance

Description:

... Technology. University of Wisconsin Madison. JA-SIG 12/4 ... JMX _at_ UW-Madison. Metrics gathering for performance tuning. Monitor heap usage and GC activity ... – PowerPoint PPT presentation

Number of Views:202
Avg rating:3.0/5.0
Slides: 26
Provided by: jimt179
Category:

less

Transcript and Presenter's Notes

Title: JMX For Monitoring and Maintenance


1
JMXFor Monitoring and Maintenance
  • JA-SIG - December 4, 2005 Atlanta, GA
  • Eric Dalquist
  • Division of Information Technology
  • University of Wisconsin Madison

2
The Problem
  • How to monitor and manage JVMs?
  • Heap usage
  • Threads
  • Connection pools
  • Simultaneous users

3
Current Solutions
  • Garbage collector logs
  • Not the easiest to read
  • Need to have a session open to each machine
  • Custom monitoring code
  • Cant always access interesting information
  • Code you have to maintain and modify

4
The JMX Solution
  • Java Management eXtensions
  • Open standard (JSR-160)
  • API and tools included with Java 5
  • Provides both Monitoring and Management

5
Advantages of JMX
  • Standards based means little or no coding
  • Many applications already instrumented
  • Existing tools to connect to MBean servers
  • Frameworks to assist in instrumentation
  • Very little impact on server performance

6
Instrumentation
  • MBeans Management beans
  • JavaBean style objects
  • Provide information
  • Statistics, current state, overall summary
  • Provide notifications
  • Application events, values out of bounds
  • Provide management
  • Live configuration changes

7
Instrumentation
  • MBean Server
  • MBeans are registered with the server
  • Management tools connect to the server
  • Aggregates information for tools
  • Polls MBeans and manages data
  • Manages MBean access rights

8
Monitoring Management
  • JMX Client
  • Can view all exposed MBeans and properties
  • Monitor multiple MBean servers (JVMs)
  • Subscribe to MBean event notifications
  • Modify writeable MBean properties

9
JMX Clients
  • JConsole
  • Comes with Java 5 and later
  • Swing based desktop application
  • MC4J
  • Open source Swing based desktop application
  • Remembers server configuration
  • Custom monitoring panel capabilities

10
JMX Clients
  • JManage
  • Web based application
  • Multiple users can monitor JVMs
  • Can connect to multiple JVMs
  • Organize JVMs into clusters
  • 2.0 beta recently released
  • Roadmap includes logging data to a database

11
JConsole
12
MC4J
13
jManage
14
JMX _at_ UW-Madison
  • Metrics gathering for performance tuning
  • Monitor heap usage and GC activity
  • Tune caches resource pools during tests
  • Monitoring production servers
  • Watch for anomalies
  • Gather usage statistics

15
Performance Testing
  • JMX adds another view of JVM metrics
  • Heap usage for all three heap spaces
  • Resource pool usage
  • Cache performance and ratios
  • Thread pool usage and sizing information

16
JVM Summary
17
Old Gen Heap
18
Production Monitoring
  • JConsole MC4J are used
  • Heap usage for memory leaks
  • Thread pools session counts for capacity
  • Connection pools for database health
  • Time spent doing garbage collection
  • Portlet output caches query statistics

19
Tomcat Thread Pool
20
Portal Session Count
21
How To Instrument
  • Spring MBean exporter
  • Easiest way to expose JavaBeans
  • Only need to declare beans to be exposed
  • Limited in exported bean configuration
  • JDK MBean APIs
  • Powerful API for describing data to export
  • Non-trivial coding required

22
JMX JA-SIG
  • uPortal 3 Beans
  • Using Spring MBean exporter
  • Access to caches, thread pools, Hibernate stats
  • Spring based portlets
  • Export caching, statistics and usage data
  • Bookmarks Portlet
  • XSLT Portlet

23
uPortal 3 RC1 Beans
24
Bookmarks Portlet
25
XSLT Portlet
Write a Comment
User Comments (0)
About PowerShow.com