• Aucun résultat trouvé

Other JSR Examples JMX instrumentation Instrumentation definition Plan Stéphane Frenot

N/A
N/A
Protected

Academic year: 2022

Partager "Other JSR Examples JMX instrumentation Instrumentation definition Plan Stéphane Frenot"

Copied!
21
0
0

Texte intégral

(1)

Fractal Workshop - 29/02/2003 1

-0;

,QVWUXPHQWDWLRQ

Stéphane Frenot

ARES

Plan

Instrumentation definition

JMX instrumentation

Examples

– Dynamic instrumentation of EJB

– Gasp a platform for GRID instrumentation

Other JSR

(2)

Fractal Workshop - 29/02/2003 3

Instrumentation & management Rôles

A model :

– defines data and models for instrumentation

A Management Application : – presents data to end-user

A Management engine :

– collects information and makes them available

Providers :

– low-level of the system that collects data

Fractal Workshop - 29/02/2003 4

WBEM / CIM

Web Based Enterprise Management

Common Information Model

(3)

Fractal Workshop - 29/02/2003 5

Example 1 : WBEM/CIM

DMTF initiative

CIM : Common Information Model

– Object-Oriented Representation of resources

MOF : Managed Object Format

– Formal description of the classes and association (CIM representation) – MOF2XML, MOF2JavaInterfaces

Standardised schemas

– Core CIM classes, network classes, software classes…

CIM object manager (CIMOM)

– Database for CIM classes instances, central point for ressource access

an XML API for CIMOM access (client access)

Example 1 : WEBM / CIMOM

Client WBEM Client Access API XML/http

CIM Object Manager (CIMOM)

Provider Static data

uses uses

DLL / Shared Object Retrievesdata

CIM schema

+ instances MOF spec

(4)

Fractal Workshop - 29/02/2003 7

Example 1 : CIM schema

Class SIMPLE_FileSystem : CIM_LogicalElement {

[

Override("Name"),

Description("The inherited Name. The value must be overriden to indicate it is now a key value and will be retrieved dynamically"), Key

]

string Name;

[Description("The total amount of space available on a filesystem")]

uint32 TotalSpace;

[Description("The total amount that is used in a filesystem")] unint32 UsedSpace;

};

Fractal Workshop - 29/02/2003 8

WBEM / CIM

Who :

– Snia (storage network industry association) opensource Wbem

– IBM through Sblim : providers for linux system

– Microsoft : WMI (Windows Management Instrumentation)

– Sun JSR146 : WBEM Services : JMX provider Protocol Adapater

Other management systems:

– SNMP : ASN.1, standard

– CMIP : Common Management Information Model, TELCO management, OSI

– Legacy product

(5)

Fractal Workshop - 29/02/2003 9

JMX :

Java Management eXtension

JMX

JMAPI : Java Management Application Interface

Defines

– the architecture, – design patterns, – APIs and

– the services

for applications and network management.

(6)

Fractal Workshop - 29/02/2003 11

-0;$UFKLWHFWXUDO2YHUYLHZ

JMX Architecture is divided into 3 levels:

– Distributed Services Level – Agent Level

– The Instrumentation Level

Plus Java APIs that enable it to inter-operate with other management protocols

Fractal Workshop - 29/02/2003 12

Management Applications

Managed Resources

JMX Instrumentation JMX Distributed

Services

JMX Agent Services

!

"$#%'&

(*)%,+-/.102%

3 %4#5%'687689:<;

= &2)

Additional APIs

Source: JavaSoft

$UFKLWHFWXUDO2YHUYLHZ$UFKLWHFWXUDO2YHUYLHZ

(7)

Fractal Workshop - 29/02/2003 13

JMX : Technical Overview

,QVWUXPHQWDWLRQ/HYHO

Specification for implementing manageable resources (Managed Beans ‘Mbeans‘)

Notification mechanisms to generate and propagate events.

CTS(Compatibility Test Suite) The Mbeans conform to the design patterns and implement the interfaces correctly.

(8)

Fractal Workshop - 29/02/2003 15

$JHQW/HYHO

Specification for implementing agents. (Mbean Server + set of services)

Agent are ‘independent‘ of the managed resources and the Managers that use them.

Currently supports J2SE (tending to PersonalJava and

EmbeddedJava)

Fractal Workshop - 29/02/2003 16

'LVWULEXWHG6HUYLFHV/HYHO

Specification management interfaces and components that can operate on agents or hierachies of agents

Connector and Protocol Interfaces

Distribute / Consolidate management Information

Implement Distribution, Scalability, Dynamic functionalities

JSR 160

(9)

Fractal Workshop - 29/02/2003 17

$GGLWLRQDO0DQDJHPHQW 3URWRFRO$3,V

Provide a specification for interacting with existing management environments.

Possibility to Instrument the protocols

A Managed Bean (MBean)

A Java Object : Class Instance : Hello

Implements a specific interface : HelloMBean

Conforms to design patterns

Both classe and interface are available through

the same classloader

(10)

Fractal Workshop - 29/02/2003 19

([DPSOH&RGH

A manageable Class

The corresponding Interface

Fractal Workshop - 29/02/2003 20

Mbeans

Interface is represented as :

– Valued attributed that can be accessed – Operation that can be invoked

– Notifications that can be emitted – Constructors for the Mbean's java class

4 types of Mbeans

– Standard MBeans : their management interface is described by their method names

– Dynamic MBeans : they expose their management interface at runtime

– Open MBean : dynamic MBean that rely only on basic types and are self describing

– Model MBean : dynamic Mbean that rely on a generic class with default behavior for ressources

(11)

Fractal Workshop - 29/02/2003 21

Mbean server

Access point for management

Provides

– client access (xml, http)

– protocol adaptors for management applications

Registers Managed Beans

Mbean starting & using MBean

MBeanServer server=MBeanServerFactory.createMBeanServer();

//first approach

MyClass m=new MyClass();

ObjectName mON=new ObjectName("Domain:name=mInstance");

server.registerMBean(m,mON); //controls if interfaces ok m.getState();

//second approach

Object [] param={new Integer(2)};

Strings [] signature={"java.lang.Integer"};

ObjectName mON2=new ObjectName("Domain:name=mInstance2");

server.createMBean("test.MyClass",mON2, null);

Object res=server.invoke(mON2, "test", param, signature);

(12)

Fractal Workshop - 29/02/2003 23

Agent architecture

Runs in a JVM act as the liaison between MBeans and the management application

A JMX agent is composed of :

– MBean server

– Set of MBeans representing managed resources – Minimum number of agent services (as MBeans) – And one of either protocol adaptor or connector

Fractal Workshop - 29/02/2003 24

MBeanServer

monitor

relation

Resource 1

Resource 2 Agent side

JVM

A

C

Management Application with a view of the

JMX Agent

C JMX Management Application

JVM

Manager side

(13)

Fractal Workshop - 29/02/2003 25

MBeanServer Rôles

Manage existing Mbeans

– Getting their attribute values – Changing their attribute values – Invoking operations

Get notification emitted by any Mbean

Instanciate and register new Mbeans from

– java classes from the server's classloader – new classes downloaded from outside

Use agent services to implement management policies

MBeanServer services

Core services (aka not external)

– Naming service – Notification Service – MBean MetaData – Registration

Agent services

– Dynamic class loading – Monitoring

– Timer

– Relation

(14)

Fractal Workshop - 29/02/2003 27

Naming

ObjectName

– [DomainName]:property=value[,property=value]*

ObjectName par=new ObjectName("Server:name=xlstprocessor");

server.createMBean("mx4j.adapt.http.XsltProcessor",par,null);

ObjectInstance

– represents the link between Mbean ObjectName and its java class. But it doesn't give access to the referenced object :

• Java class name of the MBean,

• the ObjectName registered for the MBean,

• a test for equality with another ObjectInstance

Query

– SetObjectInstance queryMBeans(ObjectName name, Query query) – SetObjectName queryNames(ObjectName name, Query query)

Fractal Workshop - 29/02/2003 28

Notification Model

Based on the Java event model

Emitted by Mbean instances as well as the Mbean Server

Specifies notification objects and the broadcaster and listener interfaces that notification senders and receivers must implement.

Management applications listen to the Mbean and

Mbean server notifications (events) remotely.

(15)

Fractal Workshop - 29/02/2003 29

MBeans MetaData

MBeanInfo - lists attributes, operations, constructors, notifications

MBeanFeatureInfo - Superclass of all features

MBeanAttributeInfo

MBeanOperationInfo

MBeanConstructorInfo

MBeanNotificationInfo

MBean Registration Control

MBeanRegistration Interface – hooks for :

• preRegister throws MBeanRegistrationException

• postRegister

• preDeregister

• postDeregister

(16)

Fractal Workshop - 29/02/2003 31

Dynamic loading

M-Let service

Enables loading MBean from an URL

ClassLoader repository

Fractal Workshop - 29/02/2003 32

Monitoring

Types

– CounterMonitor : Observes attributes with java integer types (Byte, Integer, Short, Long)

• >0

• ++

• roll over (modulus)

– GaugeMonitor : Observes java Integer or floating point type (Float, Double), increase or decrease arbitrarily

– StringMonitor : Observes a String

MonitorNotification

– Threshold

– HighThreshold, LowThreshold – Matches, Differs

(17)

Fractal Workshop - 29/02/2003 33

Timer

Notifications that are triggered only once

Notifications that are repeated with a defined period and/or number of occurrences

– TimerNotification object – addNotification

Relation Service

N-ary relation between MBeans

Managed by the MBeanServer

Relies on Notifications

(18)

Fractal Workshop - 29/02/2003 35

Conclusions

Fractal Workshop - 29/02/2003 36

WEBM / JMX

Webm

– "Only" a hierarchical data repository – Relies on a formal model

– Global management – XML Access

– No providers

JMX

– Policy enabled (Execution and Datas) – Standard services

– Java

(19)

Fractal Workshop - 29/02/2003 37

ARES Project 1

Monitoring of a GRID system

GASP project

Definition and Storage Monitoring

Collect

WBEM JMX

NWS

1:6PRQLWRUVWKHSODWIRUP

-0;FROOHFWVGDWDPDQDJHVOLIHF\FOHDQGDFWVDVD:%(0SURYLGHU :%(0GHILQHVWKHHQYLURQPHQWVWRUHVDQGDJJUHJDWHVGDWDV

ARES 1 : NWS management

JMX Monitoring platform

NWS Daemon NWS Daemon NWS Daemon

NWS NameServerMBean NWS MemoryMBean NWS ForecasterMBean

NWS Daemon

NWS Name Server

Interface NWS Memory Interface

NWS Forecast

NWS Name Server

NWS Sensor (manually launched) NWS Memory MBean Server

Timer Relation

XML Adaptor

HTML viewer

NWS Memory Java object

NWS Name Server

Java object NWS

Forecast Interface

NWS Forecaster Java object

NWS SensorMBean NWS Sensor

Interface

NWS Sensor Java object cre

ate HTML

processor

*

WEBM client

NWS protocol

NWS protocol

NWS protocol

NWS protocol

(20)

Fractal Workshop - 29/02/2003 39 Management

platform

Management client

½

Dynamic EJB instrumentation

½

Linking Application Server and management system

½

Each EJB (Home/Remote) has an MBean counterpart

ARES Project 2

EJB Serveur EJB

HC

EJB HC

EJB HC

Instrumentation service

Instrumentation descriptor

Managed EJB

+

Management Constraints

Fractal Workshop - 29/02/2003 40

ARES 2 : Instrumentation service

– Interception during deployement phase

– Instrumentation Descriptor : ID= f (Home interface, Component) – Relies on a neutral langage (xml) – Defines the Managed EJB

EJB

Deployement service

Introspection generation

transformation

home remote

Instru

Managed EJB

Main Points

(21)

Fractal Workshop - 29/02/2003 41

Java related JSR & info

JSR 2 - JMX (v1.1, v1.2)

– Eamonn Mc Manus – MX4J, RI sun

– JSR 160 - JMX Remote

JSR146 - WBEM services: JMX Provider protocol adapter

Tools Standardization Initiatives for the J2EE

– JSR77 - J2EE management specification - Hans Hrasna

• CIM model for J2EE management

– JSR88 - J2EE Deployement API - Rebecca Searls

• API for the deployement service

Références

Documents relatifs

Direct Connection, Frequency Measuring Mode (Model RFM-10D) Operating Controls, Indicators and Receptacles (Model RFM-11A) Electronically Swept Frequency Generation

a. Connect the power supply positive lead to pin 9 and the negative lead to terminal 21 of the rear panel 24 pin connector. Disconnect the positive lead of A 1A4C35 from

Next, the active mapping file is used to do the logical-to-physical page number resolution; the physical page found in objects.data contains the consumer instance record data.

La prise en compte de la théorie de la contingence suppose à notre sens que les instruments de gestion soient formalisés, pertinents et cohérents entre eux, et

To be specific, we present two instrumentation languages to specify Kieker monitoring probes based on structural information of the application specified in Palladio component

L'intensité d'une raie de diffraction est proportionnelle au carré du facteur de structure. Pour des structures avec plusieurs atomes, le nombre de termes dans la somme de F est égal

The physical construction of the electronic circuit was tested in a breadboard. A voltage regulation stage to 5 volts, for the protection and adequacy of power microcontroller,

Flat, ring-shaped lead or tungsten septa are used, not only to reduce the number of scattered events collected, but to minimize other effects of radiation originating outside the