JMX Training

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    JMX Training - Presentation Transcript

    1. JMX & Your Systems Health
    2. A briefer history…(If its good enough for Hawking…)
      JSR 3
      Released in December of 2002
      JSR 160
      Released in October of 2003
      Added remote API for MBean Servers
    3. Terms
      Manageable Resource
      Any device, application, or entity that can be accessed or wrapped by Java.
      MBean
      Managed Bean – A Java class that implements elements of the JMX spec.
      MBean Server
      A Java class that manages a group of MBeans – the place you register your MBeans.
      JMX Agent
      A Java process that provides a set of services for managing MBeans – the container for the MBean server.
    4. Terms cont.
      Protocol Adaptors
      Provide a management view of the JMX agent through a given protocol, e.g. SNMP, HTTP
      Connectors
      Convey management operations transparently point-to-point over a specific protocol, e.g. RMI.
      Notifications
      Java objects published by MBeans and MBean servers to encapsulate events, alerts, or general information.
      Instrumentation
      The exposing of a manageable resource via an MBean.
    5. Architectural layers
      Instrumentation
      Allows for management of resources – your apps objects etc… via MBeans
      Agent
      Home of the MBean server, hosts all of your MBeans.
      Manager
      Provides the environment through which your MBeans talk to the outside world.
    6. Architectural layers
    7. Who’s using JMX?
      Major App Server Vendors
      JBoss
      WebLogic
      WebSphere
      ESB Vendors
      Sonic
      IBM
      JBI – Java Business Integration
      JSR 208
    8. Why JMX – why them-us-me?
      A cheap way to manage Java applications
      Bonus – it’s now part of JSE 5
      Will be supported by JEE 5
      If need be you can interrogate the JVM
      Short learning curve as compared to technologies like SNMP
      If you know basic Java principles and patterns you are close to writing your own MBeans
      Very component oriented
      Even the MBean Server is a component – they’re all components!
    9. Why JMX – why them-us-me? (cont.)
      Handy little features like
      Alerts
      Events
      Statistics
      Notification Model
      Broadcasters
      Listeners
    10. Why JMX – why them-us-me? (cont.)
      Services
      Timer MBeans
      Monitor MBeans
      Counter
      Gauge
      String
      Relations
    11. When to ponder?
      You can add JMX to a system anytime – but if you wait…
      It’ll require some refactoring
      Tends to not be woven into the fabric of the design
      Kinda like adding on that mother-in-law addition to the house…
      Best to do it early
      Consider support needs in requirements gathering
      What will you want to know as the system is running in production?
      Design for it
      Look at macro and micro picture
      From components, tiers, and system perspectives
      Can be an aid for unit and integration testing
    12. Plumbing for better health
      Instrumentation of key system resources
      Business process controllers
      Channels (queues)
      Data Accessors
      External interfaces
      Notifications of
      Threshold violations and near misses
      Almost a violation but not quite!
      Volumes
      Throughput
    13. Where to look -
      Tier interfaces
      Delegates
      Facades
      System infrastructure –foundational classes e.g.
      Exception handling – levels, counts
      Logging – file sizes
      Security – violation counts
      System Interfaces
      Gateways
      Endpoints
    14. What to look with
      MBeans – helpful little buggers
      Standard
      Dynamic
      Open
      Model
      Standard MBean
      Quickest to implement
      Most limited
      Model MBean
      Somewhat more complicated to work with
      Offer the most flexibility
    15. So how does this relate to real systems?
    16. Where to look - revisited
      Using the ‘real’ system on the previous slide, we’ll identify points of interest to instrument
      Each of those cute little graphics represents a business component – a candidate for instrumentation…
      What aspects of these subsystems do we care about once the app is in production?
      Lets highlight and talk about some of them.
    17. Where to look - revisited (cont.)
      E-commerce Website
      Number of hits an hour
      Average length of stay
      Shopping cart
      Number of active shopping cart instances in an hour
      Average length of time taken to process an order
      Check out
      Average length of time to process credit purchases
      Number credit purchases in a hour
      Shipping
      How many confirmed in an hour – reflects B2B integration point
    18. Why we’re looking
      We want to understand the systems performance so we gather stats on -
      Volumes of Units of Work (UOW) in subsystems
      E.g. Hits on the website
      The length of time that its takes to complete business processes
      E.g. The time to complete a credit transaction
      We want to know when we’re experiencing level of service issues so -
      Send alerts when preset thresholds are
      Exceeded - reactive
      Reach a percentage of capacity - preventive
    19. How to look -
      Gathering stats.
      package com.ecommerce.systemhealth
      public interface WebsiteMetricsMBean {
      public int getOrdersPerHour();
      }
      public class WebsiteMetrics implements WebsiteMetricsMBean {
      private int ordersPerHour;
      public void addToOrdersPerHour(int count){…}
      public int getOrdersPerHour() {…}
      }
    20. How to look -
      Sending alerts.
      package com.ecommerce.systemhealth
      public interface WebsiteAlertsMBean {
      public int areOrdersPerHourNearThreshold(int orders);
      }
      public class WebsiteAlerts extends NotificationBroadcasterSupport implements WebsiteAlertsMBean {
      public void areOrdersPerHourNearThreshold(int orders) {
      // check the new value against the threshold if exceeded
      sendNotification(notification);
      }
      }
    21. Ways to watch – management tools
      Part of the game
      Sun’s JConsole
      Open source
      XMOJO
      MX4J
      Generous Licenses
      MC4J
      EJTools JMX Browser
      Payware
      Wil-Co Cockpit – provides graphical front components for JMX services in a designer view.
    22. Who to tell and how?
      Staff in
      Application support
      Server support
      Integration support – B2B partners
      DBAs
      Let them know via
      Email
      Pager
      Monitoring control dashboards, e.g. Tivoli
    23. Some handy links
      http://java.sun.com/j2se/1.5.0/docs/guide/jmx/
      http://java.sun.com/products/JavaManagement/index.jsp
      http://java-source.net/open-source/jmx
      http://devresource.hp.com/drc/resources/jmxds/index.jsp
    24. Some books
      JMX in Action -- by Benjamin G. Sullins
      Java Management Extensions -- by J. Steven Perry
      I have both of the above, the first seems to be the most comprehensive
      Java and JMX: Building Manageable Systems -- by Heather Kreger

    + Intertech TrainingIntertech Training, 4 months ago

    custom

    324 views, 2 favs, 0 embeds more stats

    http://www.Intertech.com

    This is a slide deck fr more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 324
      • 324 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories