• No results found

Using and Extending the Test and Performance Tools Platform (TPTP)

N/A
N/A
Protected

Academic year: 2021

Share "Using and Extending the Test and Performance Tools Platform (TPTP)"

Copied!
109
0
0

Loading.... (view fulltext now)

Full text

(1)

Tutorial #2

Using and Extending the Test and Performance Tools

Platform (TPTP)

Eugene Chan

IBM Rational Software

Paul Slauenwhite

(2)

Agenda

ƒ Introductions

ƒ

Speakers

ƒ

Participants

ƒ What is Problem Determination?

ƒ

Problem Statements

ƒ

Taxonomy

ƒ

Tooling

ƒ

Benefits

ƒ Eclipse

ƒ TPTP Project

ƒ

Mandate

ƒ

Participants

ƒ

Composition

ƒ

Architecture

(3)

Agenda (continued)

ƒ TPTP EMF Data Models

ƒ

Trace

ƒ

Log

ƒ

Statistical

ƒ Agent Controller

ƒ

Architecture

ƒ

Trace Agent

ƒ

Logging Agents

ƒ

Statistical Agents

ƒ Common Base Event

ƒ

Design

ƒ Generic Log Adapter

ƒ

Architecture

ƒ

Adapters

(4)

Agenda (continued)

ƒ Logging Scenarios

ƒ Architecture

ƒ Logging Facility Support

ƒ Log and Trace Analyzer

ƒ Architecture

ƒ Importing and Monitoring

ƒ Profiling and Logging Perspective

ƒ Symptom Databases

ƒ Analysis

ƒ Correlation

(5)

Agenda (continued)

ƒ Demonstrations

ƒ

Profiling and Logging Perspective

ƒ

Launch Configuration

ƒ

Attaching to a Java Application

ƒ

Profiling Options

ƒ

Profiling Views

ƒ

Preferences

ƒ

Statistical Monitoring and Analysis

ƒ

Statistical Analysis Views

ƒ

Generic Log Adapter

ƒ

Logging Scenarios

ƒ

Log File Parsers

ƒ

Log View

ƒ

Log Analysis

ƒ

Log Correlation

(6)

Agenda (continued)

ƒ Conclusion

ƒ Project Extensibility

ƒ Future work

ƒ Resources

ƒ Questions, Answers and Discussion

ƒ IBM Sessions at EclipseWorld

ƒ Appendix 1- Java Logging XML Log File

ƒ Appendix 2- logger.dtd

(7)

Introductions - Speakers

ƒ Eugene Chan

ƒ Software Developer

ƒ IBM Rational Software

ƒ [email protected]

ƒ Paul Slauenwhite

ƒ Software Developer

ƒ IBM Rational Software

ƒ [email protected]

(8)

Introductions – Participants

ƒ Name and city.

ƒ Company or academic institution.

ƒ Eclipse and TPTP experience.

ƒ Tutorial objectives.

(9)

What is Problem Determination? - Problem Statements

ƒ Modern computing systems are becoming

more complex with the rapid development of

raw computing power (e.g. processing speed

and storage capabilities) and distributed

technologies.

ƒ Computing systems are more fragmented with

the proliferation of distributed technologies,

such as the Internet.

ƒ Numerous heterogeneous products and

applications are now required to build modern

computing systems.

ƒ Pervasive and ubiquitous computing devices

pose new management complexities.

ƒ Shortage of highly skilled workers to manage

and maintain complex heterogeneous

computing systems.

ƒ Problems are growing exponentially due to an

equally increasing use of complex computing

technology.

(10)

What is Problem Determination? - Taxonomy

ƒ Monitor, evaluate, detect, analyze, correlate, resolve and diagnose the root cause of

run-time problems in complex end-to-end heterogeneous computing systems.

ƒ Most computing systems generate log and/or trace data which is a rich source of system

activity and control flow information.

ƒ Useful for detecting and resolving run-time problems such as configuration errors,

performance degradation, exception states, resource starvation, security failures,

communication delays and deadlocking.

ƒ However:

ƒ

Typically persisted in large (MB – GB) files.

ƒ

Standards and terminology formats vary between vendor, product and version.

ƒ

Varying levels of detail (e.g. terse and obscure).

ƒ

Distributed systems scatter files across the network.

ƒ

Textual viewing and manual searching or proprietary tooling.

ƒ

No detailed explanation or solutions for records.

(11)

What is Problem Determination? - Tooling

ƒ Centralized tooling to collect and consolidate log and trace data from

disparate systems into a single management tool.

ƒ Based on open standards to be useful and to promote widespread adoption

in a heterogeneous environment.

ƒ Promotes a common event format for vendor, product and version-specific

log and trace formats.

ƒ Consumes a common event format for viewing, navigating, sorting, filtering

and searching large amounts of log and trace data.

ƒ Correlates log and trace records to determine sets of related events thereby

visualizing control flow across distributed systems.

ƒ Analyzes log and trace records to provide explanation and possible solutions

to known problems.

(12)

What is Problem Determination? - Benefits

ƒ Extensible open-source tools and technology with consistent and public

interfaces and points of control for industry-wide acceptance, agreement and

adoption.

ƒ Assist end-users, administrators, field service engineers and developers in

decreasing the time required for debugging, maintaining and securing

complex computing systems.

ƒ Increase return on administration investment by reducing maintenance costs

and improve asset utilization.

ƒ More efficient systems to better focus resources on business processes.

ƒ Rapid problem determination translates into increased system stability,

security, availability, resiliency and overall QoS.

ƒ Problem Determination =

Ø

Costs +

×

Stability

(13)

Eclipse

ƒ An open-source project dedicated to provide an universal, robust,

full-featured and commercial-quality platform written in Java for developing

Integrated Development Environments (IDEs).

ƒ Founded by IBM and other industry leaders in November 2001.

ƒ Composed of projects, each of which is overseen by a Project Management

Committee (PMC) and governed by its Project Charter.

ƒ Each project is composed of its own subprojects and is licensed under the

Eclipse Public License (EPL) starting in 2005.

(14)

TPTP Project - Mandate

ƒ Started in 2002 as an Eclipse tools subproject named Hyades.

ƒ Promoted in 2005 to an Eclipse project and renamed as the Test and Performance Tools Platform

(TPTP) project.

ƒ Open-source platform for Automated Software Quality (ASQ) tools including reference

implementations for testing, tracing and monitoring software systems.

ƒ Extensible framework and infrastructure that embraces automated testing, trace, profiling, monitoring,

and asset management.

ƒ Includes an unified data model, normative user experience and workflow and an united set of APIs

and reference tools that work consistently across a range of targets.

ƒ Principles:

ƒExtension of the Eclipse Value Proposition ƒVendor Ecosystem

ƒVendor Neutrality

ƒStandards-Based Innovation ƒAgile Development

(15)

TPTP Project - Participants

ƒ Alphabetical order:

ƒComputer Associates

ƒCompuware

ƒFOKUS

ƒIBM

ƒIntel

ƒOC Systems

ƒSAP

ƒScapa Technologies

(16)

TPTP Project - Composition

ƒ TPTP is composed of 4 projects:

ƒPlatform ƒTest

ƒTrace and Profiling ƒMonitoring

ƒ Each project is divided into technology domains:

ƒUI ƒAnalysis ƒEMF Model ƒCollection Control ƒCommunications ƒExecution ƒAgents/Events ƒDoc

ƒ Each technology domain divided into components,

each with an assigned committer.

(17)

TPTP Project - Architecture

Presentation System

Test

Trace

EMF Data Models

Log

Statistical

XMI

Real Time

Export

Runtime

Monit

or / log

Trace An

alysis

And Profiling

an

Test Creation

d Execu

tio

n

Artifact

Management

Eclipse TPTP UI

Standard Widgets and

Core Plug-ins

Reference Perspectives

And Workflow

Target System

Data Collection

Application

Data Collection

Interface

Injection

Correlation

Execution

Environment

Log Collection

Trace Collection

System Performance

JVMPI Monitor

Data Loader

Distributed

Data Collection

Framework

Agent

Control Interface

Agent

Control Interface

Distributed

Control

Framework

Testability Interface

Test Engine

JVMTI Monitor

TBD

(18)

Eclipse Modeling Framework (EMF)

ƒ Framework and code generation facility for designing and implementing applications

based on a structured data model.

ƒ Data models are used to describe data objects, attributes and relationships.

ƒ Data models may be designed using annotated Java, XML, or UML class diagrams and

converted to an EMF model specification defined in XML Metadata Interchange (XMI).

ƒ The XMI model specification is used to generate the Java implementation classes for

the data model, a set of adapter Java classes that enable viewing and command-based

editing of the data model, and a basic editor UI.

ƒ The generated Java implementation classes are used to instantiate, load and persist

in-memory data models.

ƒ A resource persistence layer is provided to permit file system abstractions, such as a

relational database.

ƒ Provides a framework for the mechanical creation of data models that are the foundation

for interoperability with other EMF-based applications.

(19)

TPTP EMF Data Models

ƒ EMF data models are used in TPTP as an integration point.

ƒ TPTP UI is build on the TPTP EMF data models.

ƒ TPTP contains five EMF data models:

ƒ Trace

ƒ Log

ƒ Statistical

ƒ Test

ƒ Behavioural

ƒ Execution History

ƒ Data models are populated by model loaders consuming structured XML

fragments originating from a variety of sources.

(20)

TPTP EMF Data Models – Trace

ƒ Used to persist stand-alone application and distributed system trace

data.

ƒ Trace data consists of structured local or distributed execution and

heap information (e.g. Java process, thread, class and method

entry/exit with object instance and time).

ƒ Hierarchal data model capturing interaction at various levels of the

execution stacks and heap (e.g. method X in class Y on thread Z).

ƒ Provides framework for capturing statistical snapshot information

(e.g. method invocation counts).

ƒ Populated by local and remote profiling (e.g. JVMPI) instrumentation

and distributed tracing facilities.

(21)

TPTP EMF Data Models – Log

ƒ Used to persist problem determination data such as logging events and messages.

ƒ Defined by the Common Base Event v1.0.1 specification:

ƒ

A common and standardized taxonomy for events occurring in hardware and software.

ƒ

Unified format and terminology for the consistent interpretation of problem determination data

to circumvent varying vendor, product and version representations.

ƒ Hierarchal data model capturing textual message(s) and metadata, such as:

ƒ

Time stamp

ƒ

Source component

ƒ

Situation

ƒ

Severity

ƒ Populated by local and remote logging facilities, Logging Agents and batch importing of

log files.

(22)

TPTP EMF Data Models – Statistical

ƒ Used to persist arbitrary numerical data over time.

ƒ Hierarchal data model capturing structured statistical data defined

by descriptors.

ƒ Descriptors may contain child counter descriptors.

ƒ Descriptors contain snapshot observations that contain actual typed

statistical data:

ƒ Discrete (integer/time)

ƒ Contiguous (float/time)

ƒ String (String/time)

(23)

Agent Controller

ƒ Terminology:

ƒ Host process:

ƒ The process that contains the application under test.

ƒ Agent:

ƒ A reusable binary file that provides services to the host process,

and more importantly, provides a portal by which application data

can be forwarded to attached clients.

ƒ Client:

ƒ A local or remote application (eg Eclipse Workbench) that is the

terminal destination of host process data that is externalized by an

agent.

(24)

Agent Controller

ƒ Standalone component independent of the TPTP workbench.

ƒ Flexible daemon that resides on each local or remote deployment host.

ƒ Used to launch new processes and attach to agents that coexist within

processes.

ƒ Interacts with processes only on the same deployment host.

ƒ Provides extensible agent architecture for control capabilities and native data

collection.

ƒ Agent hosted within the Agent Controller may communicate data back to

monitoring clients (e.g. TPTP client).

ƒ TPTP client provides launch, attach, communication and data modelling

loading functionality.

(25)

Agent Controller – Architecture

RAC

Agent(s)

Sh.Mem Socket

CMD

Socket

Bindings

Local

TPTP

Client

Remote

TPTP

Client

DAT

Config

(26)

Agent Controller – Architecture

RAC

Agent(s)

Sh.Mem Socket

CMD

Socket

Bindings

DAT

Config

TPTP Client

Control

views

Loaders

Channel

Reader

Results

Views

Tools

EMF model

Storage

Command

Messages

Data

Messages

(27)

Agent Controller – Architecture

ƒ Supported platforms include:

ƒ AIX-RPC

ƒ HPUX-RISC

ƒ LINUX-IA32

ƒ LINUX-PPC64

ƒ LINUX-ZSERIES

ƒ OS/400-ISERIES

ƒ SOLARIS-SPARC

ƒ WINDOWS-IA32

ƒ Z/OS-ZSERIES

(28)

Agent Controller – Trace Agent

ƒ Java Virtual Machine Profiling Interface (JVMPI) agent implementation for

profiling local or remote Java applications from a local TPTP workbench to

capture and record an application's behavior.

ƒ Used for performance details such as classes or methods responsible for the

poor execution performance as well as to analyze application heap and

locate memory leaks.

ƒ Emits trace XML fragments based on a structured Event Specification for

Java Profiling (

trace.xsd

).

ƒ May be launched from the TPTP workbench or invoked using the -Xrun JVM

command line option.

ƒ A trace XML loader at the client side receives and parses the trace XML

fragments returned from any agent.

(29)

Agent Controller – Logging Agents

ƒ XML message-based agent for real-time monitoring of message

generating facilities (e.g. loggers).

ƒ Extensible architecture for crafting proprietary Logging Agents:

ƒ Defined APIs and programming model.

ƒ C implementation with a Java wrapper for supporting C/++ and Java

run-times.

ƒ TPTP provides Logging Agent support for several popular

Java-based logging and tracing facilities.

(30)

Agent Controller – Statistical Agents

ƒ XML message-based agent for real-time monitoring of operating systems, web servers, database

servers and application servers:

ƒ Windows System Performance Data (Perfmon) ƒ Linux System Perfmon Data

ƒ JBoss Application Server JMX Data ƒ JOnAS Application Server JMX Data ƒ Apache/IHS server-status Data

ƒ MySQL Database Table and Variable Data

ƒ Emits statistical XML fragments based on a structured schema (statistical.xsd).

ƒ Examples of operating system metrics include:

ƒ CPU usage. ƒ Network activity. ƒ Disk activity. ƒ Memory usage.

ƒ Views to effectively visualize the large amount and varying types of statistical data in real-time.

ƒ Extensible architecture for crafting proprietary Statistical Agents:

(31)

Common Base Event

ƒ Open-source specification (OASIS) to provide a common and standardized

taxonomy for events occurring in hardware and software.

ƒ Unified format and terminology for the standardized exchange and consistent

interpretation of problem determination data to circumvent varying vendor,

product and version representations.

ƒ Provides a mutual format for event data enabling the interoperability of

problem determination technologies and tooling thereby decreasing the costs

of managing complex computing systems.

ƒ Designed to abstractly describe all events within a multi-component system

but sufficiently granular to describe any occurrence or incident.

ƒ Common Base Event XML schema defines the overall structure of the event,

format of each property and all mandatory properties for completeness.

ƒ TPTP provides EMF consumer (e.g. model artifacts) Java, EMF producer

(e.g. native logging) Java, non-EMF Java and C/C++ implementations.

(32)

Common Base Event - Design

ƒ

Events consist of message(s) and

metadata resulting from an occurrence

or situation including autonomic,

logging, tracing, management and

business situations.

ƒ

Events are derived from situations that

are based on a structured 3-tuple

format:

ƒ

Situation data, the properties

describing the situation including

correlation information.

ƒ

Component impacted by a

situation, or the source

ƒ

Component observing a situation

ƒ

All other required and optional event

properties provide context for the

situation.

(33)
(34)

Generic Log Adapter

ƒ Tooling that transforms log and

trace data in proprietary formats

into the Common Base Event

format for use as a problem

determination resource.

ƒ Assists developers in adapting log

and trace data to the Common

Base Event format without

re-writing existing applications.

ƒ Originated from IBM Research as

a mechanism to cheaply enable

Common Base Event compliance

in legacy computing systems.

(35)

Generic Log Adapter - Architecture

ƒ Based on a pluggable pipe and

filter architecture.

ƒ Filters or components are

organized by contexts which are

associated with one specific data

set.

ƒ Scalable to support large amounts

(MB – GB) of log and trace data.

ƒ Four modes of operation:

ƒBatch or continuous.

ƒStatic or rules.

(36)

Generic Log Adapter – Adapters

ƒ Transforms are defined in adapter files:

ƒContains one or more contexts and the components for each context.

ƒStored as XML based on a defined schema.

ƒ Parsing component incorporates mapping proprietary log and trace

record properties to Common Base Event properties using mapping

rules.

ƒRules are defined using static strings or regular expressions (e.g. Perl).

ƒStatic Java parsers may be used to parse data.

ƒ Adapter Configuration Editor provides a tool to write, debug and test

adapter files using a template log file.

ƒ Adapter files may be mechanically converted into Log File parsers for

use in the Log and Trace Analyzer.

(37)

Logging Scenarios

ƒ

New or redesigned systems may be instrumented to natively generate Common

Base Events using the producer Java implementation.

ƒ

However:

ƒ

Java-based logging and tracing facilities often enforce proprietary record formats.

ƒ

No existing integration with tooling for real-time monitoring of loggers and logged records.

ƒ

Hyades provides the following support for several popular Java-based logging and

tracing facilities:

ƒ

Common Base Event logging.

ƒ

Logging Agent sinks.

ƒ

Filtering.

ƒ

Configuration.

ƒ

Formatting.

(38)

Logging Scenarios - Architecture

Client

Server

(39)

Logging Scenarios - Logging Facility Support

ƒ TPTP provides Common Base Event and Logging Agent standalone

and plug-in support for the following popular logging facilities:

ƒ Jakarta Apache Commons

ƒ Java Logging (JSR-047)

ƒ Jakarta Apache Log4J

ƒ Extensible architecture for crafting proprietary Logging Agents:

(40)

Log and Trace Analyzer

ƒ Eclipse-based tooling for collecting, persisting, viewing, navigating,

sorting, filtering and searching EMF model data.

ƒ Permits users to monitor, evaluate, detect, analyze, correlate,

resolve and diagnose the root cause of run-time problems in

complex end-to-end heterogeneous computing systems.

ƒ Extensible architecture to allow vendor and product specific EMF

model views and problem determination tasks.

(41)

Log and Trace Analyzer - Architecture

Client

Server

(42)

Log and Trace Analyzer - Importing and Monitoring

ƒ Tooling for batch importing of log and trace files into the Common Base

Event EMF models using Generic Log Adaptor static and rules parsers.

ƒ Log and trace files may be imported from the local and/or remote machine.

ƒ Real-time monitoring of Logging Agents to populate Common Base Event

EMF models.

ƒ

Jakarta Apache Commons

ƒ

Java Logging (JSR-047)

ƒ

Jakarta Apache Log4J

ƒ

Proprietary Logging Agents

ƒ Extensible architecture to allow vendor and product specific log and trace file

parser and Logging Agents.

(43)

Log and Trace Analyzer - Profiling and Logging Perspective

ƒ Set of views to display log, trace,

statistical and profiling EMF model data in

a well organized format.

ƒ Hierarchically organized by folder,

monitor, host, process and varying

agents.

ƒ Log view provides a nested tree-like

display for viewing, navigating, sorting,

filtering and searching for large amounts

of log and trace data.

ƒ UML Sequence Diagram view provides a

graphical representation of interactions.

ƒ Statistical console provides a visual

display with graphing capabilities for the

statistical EMF model.

ƒ Extensible architecture to allow users to

define vendor and product specific views.

(44)

Log and Trace Analyzer – Symptom Databases

ƒ A database consisting of matching patterns indicating known

problems, explanations and resolution steps.

ƒ Persisted as an XML file with a defined schema.

ƒ Crafted using the Symptom Database Editor in the Log and Trace

Analyzer.

ƒ Vendors and organizations may provide multiple hierarchal symptom

databases based on logical or business divisions.

ƒ Local and remote (FTP/HTTP) importing functionality to ensure

content freshness.

(45)

Log and Trace Analyzer - Analysis

ƒ Allows users to easily detect and solve problems that have already

been previously encountered.

ƒ Analysis consists of lexicographically comparing varying Common

Base Event properties with match patterns in one or more symptom

databases.

ƒ Extensible architecture to allow users to define vendor and product

specific analysis engines.

(46)

Log and Trace Analyzer - Correlation

ƒ Computing system maintainers require a detailed understanding of

an entire computing system in order to detect and resolve cascading

problems.

ƒ Correlation determines one or more sets of related events to

visualize control flow within and between computing systems.

ƒ A correlation engine or schema associates varying Common Base

Event properties based on a predetermined criteria (e.g. time).

ƒ Extensible architecture to allow users to define vendor and product

specific correlation engines or schemas.

(47)

Demonstrations

ƒ Attendees are not required to have a computer.

ƒ Configuration for attendees with computers:

ƒ

Eclipse v3.1.0

ƒ

TPTP v4.0.0

ƒ

EMF v2.1.0

ƒ

XSD v2.1.0

ƒ

JRE v1.4.2 or above

ƒ

Agent Controller v4.0.0

ƒ http://www.eclipse.org/tptp/ >> Latest Downloads >> 4.0.0

ƒ See the Requirements section for the Hyades dependencies.

ƒ See the Related Documents section for the release notes and installation

guide.

(48)

Demonstrations

ƒ Application used for the demonstrations consists of a simple

multi-threaded HTTP proxy server.

ƒ Architecture of the simple multi-threaded HTTP proxy server

follows a dispatcher and worker pattern.

ƒ Dispatcher threads listen to one or more ports on a given host

(e.g. local host).

ƒ Worker threads handle the individual HTTP requests for a

given dispatcher.

(49)

Profiling and Logging Perspective

ƒ The profiling tools available in the Profiling and Logging perspective

provide comprehensive information about the performance of an

application

ƒ The profiling tool (in this scenario i.e. – Java Profiling) provides

information pertaining to

ƒ JVM performance

ƒ Object allocations and references

ƒ Garbage collection

ƒ Object methods performance

ƒ Object->Object interactions

(50)

Profiling and Logging Perspective

Monitor contains

processes from hosts that

are bring monitored

Hosts being monitored

in a profiling session

Java processes

associated with a host

(51)

Profiling and Logging Perspective

ƒ Profiling and Logging perspective provides resources to

administering and managing profiling

ƒ Profiling resources are organized to provide granularity of usage

ƒ Profiling resources

ƒ Project: Make a project of your profiling effort

ƒ Monitor: Aggregate different processes and agents

ƒ Host: The host you are profiling

ƒ Process: Very simply the executing program

ƒ Agent : Provides services to a process, a mechanism by which

process data can be sent to (attached) clients

(52)

Profiling and Logging Perspective - Profiling Monitor View

ƒ A Profiling session creates numerous resources

ƒ Administer and Analyze Profiling activity

ƒ Object Control: Choice of action depending on the type of the object

ƒStart and Stop the monitoring on an agent

ƒAttach and Detach the agent from process

ƒTerminate a process

ƒCollect object reference and Run GC on a process

ƒ Context menu is resource-sensitive

(53)

Profiling and Logging Perspective - Profiling Monitor View

ƒ Project:

ƒ Container of the profiling resources

ƒ Monitor:

ƒ A logical container for the profiling information that is collected

from a group of agents. The views at the monitor level show

data from these agents. Monitors are useful for aggregating

processes and agents from a distributed application

ƒ Host:

ƒ Owns the processes that are profiled. A host runs processes.

You can specify a host either by its name or by its IP address

ƒ Process & Agent:

ƒ In the Agent Controller architecture model, an agent is a binary

file that provides services to the host process by which

(54)

Launch Configuration

ƒ Profiling Tool provides the ability to attach to a running application or

to launch an application for profiling with launch configurations

ƒ Attaching an application means that a monitor is created to contain the

results observed by an associated agent

ƒ Launch a process means that the process is started a process with an

agent associated to the process

(55)

Launch Configuration - Configurations

ƒ Attach Java Process:

ƒlocal or remote

ƒ External Java Application:

ƒ local or remote

ƒ Java Applet :

ƒ workbench (local)

ƒ Java Application :

ƒ workbench (local)

ƒ Eclipse Application :

ƒlocal

ƒ Other launch configurations:

ƒfor Statistical data

ƒHost

ƒJ2EE App Server

ƒfor Test

(56)

Launch Configuration - Configuration tabs

ƒ Each type of launch configuration defines a group of tabs that collect

and display information about the configuration

ƒ Tabs for profiling:

ƒ Host tab : defines the location of the process to be launched or attached

ƒ Agents tab : used for attach launch configurations, list the agents available

for attach

(57)
(58)
(59)
(60)

Attaching to a Java Application

ƒ Attaching to a Java Application

ƒ Local Java Application

ƒ Remote Java Application

ƒ Attach to a running application or to launch an application for

profiling.

ƒ Attaching : Gather data observed by an associated agent.

ƒ Launching : the process is started with an agent associated to

the process.

(61)

Attaching to a Java Application

ƒ What is happening?

ƒ A logical representation of the Java process is created in the

Profiling Monitor view

ƒ The process object i.e. logical representation of the Java

process, is identified both by name and an ID number (PID)

that appears in the view along with the associated agents

(62)
(63)

Attaching to a Java Application

java -XrunpiAgent:server=enabled <<test>>

Start a java

program with the

profiling agent

Attach to the java

process and start

monitoring

(64)

Attaching to a Java Application - Local

ƒ Profiling and Logging

perspective to attach to a

running process locally

(65)

Attaching to a Java Application - Remote

ƒ Required to Install Eclipse Data

collection engine on the remote

machine

Host 2

Host 1

Lau nch Atta ch

(66)

Profiling Options

ƒ The profiling options are used

to control the type of profiling

data collected

ƒ Profiling Set

ƒ Profiling Type

ƒ Profiling Filter

ƒ Profiling Limits

ƒ Profile to File

(67)

Profiling Options - Profiling Set and Profiling Type

ƒ Specify an existing or build a

set of profiling type to control

the type of profiling data

ƒ Pre-defined Sets:

ƒExecution history

ƒMemory analysis

(68)

Profiling Options - Profiling Filter

ƒ Limit the classes and

method profiled

ƒ Avoid unnecessary visual

clutter and speed up the

profiling task

(69)

Profiling Options - Profiling Limits

ƒ Profiling Limits page can be

used to limit the amount of

data collected from the

application

ƒ Specify the amount of data you

want collected by specifying a

limit on method invocations or

on time.

(70)

Profiling Options - Profiling File

ƒ

Route the profiling events to an

xml file instead of the profiling

views

(71)

Profiling Options - Import profiling file

ƒ Profiling file can be imported

into workbench for visual

presentation and analysis

ƒ File -> Import... -> Profile File

ƒ Select range of file to be

imported

(72)

Profiling Views

ƒ Number of views to visualize and organize profiling data

ƒ Memory Statistic view

ƒ Execution Statistic view

ƒ Coverage Statistic view

ƒ Method Invocation Detail view

ƒ Object Reference view

ƒ Execution Flow view and table

ƒ Method Invocation view and table

ƒ UML2 Trace Interactions view

(73)

Profiling Views - Statistical Views

ƒ Profiling Type oriented

ƒExecution

ƒMemory

ƒCoverage

ƒ Drill down capability

ƒPackage

ƒClass

ƒMethod

ƒInstance

ƒ Additional Information available on

toolbar

ƒChoose columns

ƒShow deltas

ƒShow as percentage

ƒOpen Source

ƒExport to HTML

ƒ View shortcut on selection

(74)

Profiling Views - Method Invocation Detail View

ƒ Display details on a method invocation

ƒ Show invoked by and invokes information on a target method

ƒ Double click on any method in views to open view, or via context menu

entry

ƒ Traverse invocation path by updating target method in the view.

ƒDouble clicking on method interested

(75)

Profiling Views - Object Reference View

ƒ Displays references by a set of objects.

ƒ Examine data structures

ƒ Help identify memory leaks

ƒ To find unexpected references

ƒ How? Collect Object References action

(76)

Profiling Views - Execution Flow View

ƒ Give a clear global view on the

overall application execution

ƒ Analyze the application

execution at the thread level.

ƒ Threads are represented by

vertical lines

ƒ Execution stack goes from left to

right

ƒ Execution time goes from top to

bottom

ƒ Interactive: Zoom In/Out or Select

Zoom

ƒ Table format display available

below the graphical presentation.

(77)

Profiling Views - Method Invocation View

ƒ Graphical representation of the

application execution that lets you

see the method execution at the

method invocation level

ƒ Makes it easier to identify the

execution patterns and differences

between invocations of the same

method

ƒ Traverse between invocation

ƒ Show Caller or Callee

ƒ Open from any Method Selection

ƒ Table format display available

(78)

Profiling Views - Interactions Views (UML2 Trace

Interactions View)

ƒ The Interactions Views present

execution flow of an application

according to the notation

defined by UML

ƒ Host Interactions

ƒ Process Interactions

ƒ Thread Interactions

ƒ Agent Interactions

ƒ Class Interactions

ƒ Object Interactions

(79)

Profiling Views - Enabling Graphical information

ƒ Enable execution flow detail

information be loaded and

visualize in graphical views

ƒ Execution Flow View

ƒ Method Invocation View

ƒ Interactions Views

(80)

Profiling Views - Filtering Support

ƒ Statistic table views provide

filtering support

ƒ Available via toolbar drop down

action

ƒ Filter type vs Filter

ƒEach view declares its type which is

used to associate to filter type(s)

ƒ Standard tab vs Advances tab

ƒStandard tab provides quick start on

common attribute filtering

ƒAdvances tab provides filtering

support on profile attributes

ƒ Default filters are available for

quick start

ƒ Select filter entry from drop down

to apply

(81)

Preferences

ƒ Preferences: Customize or modify Profiling and Logging

Preferences

ƒ Enable or disable profiling or logging

ƒ Specify the port number that the agent uses to connect to the Agent

Controller

ƒ If you are working with more than one machine, use Hosts to identify

them

ƒ To identify logging agents, use Logging Agents

ƒ Associate views to Context menu of resources in the profiling

monitor view

(82)
(83)

Statistical Monitoring and Analysis

ƒ TPTP Statistical data collection agents collects the following data:

ƒ

Windows System Performance Data (Perfmon)

ƒ

Linux System Perfmon Data

ƒ

JBoss Application Server JMX Data

ƒ

JOnAS Application Server JMX Data

ƒ

Apache/IHS server-status Data

ƒ

MySQL Database Table and Variable Data

ƒ Various views available to control statistical agents and view statistical data

collected:

ƒ

Profiling Monitor view

ƒ

Agent Control views.

ƒ

Statistical Graph

(84)

Statistical Monitoring and Analysis

ƒ In Profiling and Logging Perspective, launch a Statistical Agent:

ƒ Create a new Profiling Launch Configuration

ƒ Run -> Profile…

ƒ Create a new Statistical configuration

ƒ Specify the host to monitor

ƒ Specify the agent to monitor

ƒ Set additional option under configuration tabs

ƒ Settings tab

ƒ Destination tab

ƒ Common tab

ƒ Click “Profile…”

(85)

Statistical Analysis Views

ƒ Profile Monitor View

ƒ

Selection in the Profiling Monitor view will be the input for statistical graph views

ƒ Agent Control View

ƒ

A generic view that is able to visualize and send agent specific commands to the

data collection agents

ƒ Statistical Graph View

ƒ

Graphical representation of statistical data that is returned by the agent

ƒ Statistical Graph Summaries View

ƒ

Allows you to set properties of the UI representation of the data lines in the Graph

View where these properties include setting a line width, or colour.

ƒ Agent Control, Statistical Graph and Statistical Graph Summaries Views are

opened via ‘Open With’ action on selection in Profiling Monitor view.

(86)
(87)

Generic Log Adapter

ƒ Creating an Adapter File

ƒ

Create a local Java Logging XML log file based on the content in Appendix 1.

ƒ

Open the Generic Log Adapter Perspective (Window >> Open Perspective >>

Other… >> Generic Log Adapter).

ƒ

Create a new simple project (File >> New >> Other… >> Simple >> Project).

ƒ

Create a new adapter configuration file using the Adapter Configuration Editor

(File >> New >> Other… >> Generic Log Adapter >> Generic Log Adapter File).

ƒ Select the local log file as the template log file.

ƒ

Start the Agent Controller (<Agent Controller install directory>/bin/RAServer.exe).

ƒ

Run and debug the new adapter configuration file using the Adapter Configuration

(88)
(89)

Generic Log Adapter

ƒ

Executing the Adapter File Continuously

ƒ

Add a SingleFileOutputter to the Context instance to output resulting Common Base Events to

a local log file.

ƒ

Move the following resources to the directory containing the adapter file:

ƒ hgla.jar (org.eclipse.hyades.logging.adapter) ƒ hlcbe101.jar (org.eclipse.hyades.logging.core) ƒ hlcore.jar (org.eclipse.hyades.logging.core) ƒ hexr.jar (org.eclipse.hyades.execution) ƒ org.eclipse.emf.ecore_2.1.0.jar ƒ org.eclipse.emf.common_2.1.0.jar ƒ /schema/* (org.eclipse.hyades.logging.adapter)

ƒ

Start the Agent Controller (<Agent Controller install directory>/bin/RAServer.exe).

ƒ

Run the following command from the directory containing the adapter file:

java -DGLA_HOME=<current directory> -classpath hgla.jar;hlcbe101.jar;hlcore.jar;hexr.jar; org.eclipse.emf.ecore_2.1.0.jar;org.eclipse.emf.common_2.1.0.jar

org.eclipse.hyades.logging.adapter.Adapter -ac demo.adapter -cc demo.adapter

(90)

Logging Scenarios

ƒ Instrument the demo application for logging using the Java Logging

APIs (File >> New >> Example… >> Logging >> JSR-047 Logging

Sample).

ƒ Configure the demo application’s logging facility:

ƒ Output to a local file.

ƒ Output to the server’s console.

ƒ Severity filtering.

ƒ XML formatting.

ƒ Run the demo application and view the generated log records in

the log file.

(91)

Logging Scenarios

ƒ

Instrument the demo application to natively log Common Base Events (File

>> New >> Example… >> Logging >> JSR-047 Logging Sample).

ƒ

Configure the demo application’s logging facility:

ƒ

Output to a Logging Agent.

ƒ

Common Base Event filtering.

ƒ

XML formatting.

ƒ

Run the demo application and view the generated log records in the log file.

ƒ

Create a customized Common Base Event Factory (File >> New >>

Example… >> Logging >> EMF Common Base Event v1.0.1 Sample).

ƒ

Write the serialized XML Common Base Events directly to a Logging Agent

(org.eclipse.hyades.logging.core.LoggingAgent).

(92)

Logging Scenarios - Monitoring Logging Agents

ƒ Start the Agent Controller (<Agent Controller install

directory>/bin/RAServer.exe).

ƒ Run the demo application.

ƒ Open the Profiling and Logging Perspective (Window >> Open Perspective

>> Other… >> Profiling and Logging).

ƒ Enable logging in the Profiling and Logging Preferences (Window >>

Preferences… >> Profiling and Logging).

ƒ Attach to the demo’s Logging Agent (Run >> Profile… >> Attach – Java

Process >> New >> Agents).

ƒ Start monitoring the demo application’s Logging Agent (<right click the demo

application’s logger> >> Start Monitoring).

ƒ Run, attach and start monitoring the Generic Log Adapter’s Logging Agent

using the new adapter configuration file.

(93)

Log File Parsers

ƒ

Log and Trace Analyzer – Import the

local Common Base Event XML log file

(File >> Import... >> Log File >> Add…

>> Common Base Event XML log).

ƒ

Create a custom parser to import the

Java Logging XML log file using the

new adapter configuration file (File >>

New >> Example… >> Logging >> Log

Parser Sample).

ƒ

Implement the

org.eclipse.hyades.logging.parsers.log

Parser extension point.

ƒ

Import the local Java Logging XML log

file (File >> Import... >> Log File >>

Add… >> Simple Parser V1.0).

ƒ

Deploying the custom parser plug-in

project to the Agent Controller for

remote importing.

ƒ

Import the Common Base Event log

file generated by running the new

adapter configuration file using the

Adapter Configuration Editor.

(94)

Log View

ƒ Select the various imported log files and the Logging Agent in the Log Navigator

View.

ƒ Manipulate the log records in the Log Records pane of the Log View:

ƒNavigation.

ƒSorting.

ƒFiltering.

ƒSearching.

ƒExport to Common Base Event XML file.

ƒ Customized log views may be created to view Common Base Event model data by

implementing the org.eclipse.hyades.ui.analyzerExtensions extension point.

(95)
(96)

Log Analysis

ƒ Create a new symptom database file using the Symptom Database Editor

(File >> New >> Other… >> Profiling and Logging >> Symptom Database).

ƒ Deploy and import the symptom database file (File >> Import... >> Symptom

Database File).

ƒ Analyze the Common Base Event log records in the Log View using the

default Log Analyzer (<right click a log record> >> Analyzer >> Default Log

Analyzer).

ƒ Create a customized Analysis Engine (File >> New >> Example… >>

Logging >> Analysis Engine Sample) by implementing the

org.eclipse.hyades.analysis.engine.logAnalyzer extension point.

ƒ Analyze the Common Base Event log records in the Log View using the

customized Analysis Engine (<right click a log record> >> Analyzer >> Demo

Analysis Engine).

(97)
(98)

Log Correlation

ƒ Create a log correlation for the Common Base Event log records in the Log View using

the Time correlation engine (File >> New >> Other… >> Profiling and Logging >> Log

Correlation).

ƒ View the time-based log correlation in the UML 2 Log Interactions View (<right click log

correlation> >> Open With >> Log Interactions).

ƒ Create a customized Correlation Engine (File >> New >> Example… >> Logging >> Log

Correlator Sample) by implementing the org.eclipse.hyades.logc.logInteractionView

extension point.

ƒ Create a log correlation for the Apache log files and the Common Base Event log

records in the Log View using the customized correlation engine (File >> New >>

Other… >> Profiling and Logging >> Log Correlator Sample).

ƒ Import the Apache log files (access.log and error.log).

ƒ View the customized log correlation in the UML 2 Log Interactions View (<right click log

correlation> >> Open With >> Log Interactions).

ƒ Open the Apache Log Correlation/Analyzer Sample (File >> New >> Example… >>

Logging >> Apache Log Correlation/Analyzer Sample).

(99)
(100)

Conclusion

ƒ TPTP Logging and Monitoring Tools provide a centralized, open-source and

extensible mechanism for end-users, administrators, field service engineers

and developers to decrease problem determination costs and improve

system quality.

ƒ Collects and consolidates log and trace data from disparate systems into a

single management tool.

ƒ Common event format for vendor, product and version-specific log and trace

formats.

ƒ Consumes common event format for viewing, navigating, sorting, filtering

and searching large amounts of log and trace data.

ƒ Correlation to determine a set of related events thereby visualizing control

flow across distributed systems.

(101)

Conclusion - Project Extensibility

Extensible architecture to allow users to define vendor and product specific:

ƒ

Agents

ƒ

Views

ƒ

Adapters

ƒ

Parsers

ƒ

Symptom Databases

ƒ

Analysis Engines

ƒ

Correlation Engines

ƒ Several existing industry products built on TPTP:

ƒ

IBM Rational Software Development Platform

(http://www-306.ibm.com/software/info/developer/)

ƒ

IBM Rational Functional Tester, Manual Tester, Application Developer and Software Architect

(http://www-306.ibm.com/software/rational/)

ƒ

IBM Autonomic Computing Tool Kit

(http://www-106.ibm.com/developerworks/autonomic/overview.html)

ƒ

OC Systems Hitchhiker for Eclipse (http://www.ocsystems.com/eclipse/)

ƒ

Scapa Test and Performance Platform

(102)

Conclusion - Future Work

ƒ 4.1 Planned Work

ƒ

Non-Java support for the profiling views and data collection.

ƒ

Support for 64 bit architectures (Linux, Windows, z/OS).

ƒ

Support for more Agent Controller platforms.

ƒ

In-process Agent Controller integrated into the TPTP workbench.

ƒ

Log Parser extension point restructuring.

ƒ

Time zone support in the GLA for consistent log correlation.

ƒ

Printing Profiling and Logging Perspective views.

ƒ

Improved documentation, defect fixes and performance improvements.

ƒ

New Agent Controller implementation supporting dynamic deployment of agents,

agent metadata, agent discoverability, communication across firewalls, optional

encryption, multiple client connections and pluggable communication protocols.

ƒ Future Work

ƒ

CBE 2.x implementation

(103)

Conclusion - Resources

ƒ Bridgewater, D., “Standardize messages with the Common Base

Event model”,

ftp://www6.software.ibm.com/software/developer/library/ac-cbe1.pdf.

ƒ Eclipse Modeling Framework (EMF), http://www.eclipse.org/emf.

ƒ TPTP Documentation (Help >> Help Contents).

(104)

Conclusion - Resources

ƒ TPTP Project, http://www.eclipse.org/TPTP.

ƒ Project architecture, organization and plans.

ƒ Downloads.

ƒ Defects.

ƒ CVS.

ƒ Developer Resources.

ƒ Documentation:

ƒ Common Base Event v1.0.1 specification, schema and API

documentation.

ƒ Tutorials.

ƒ Mailing Lists.

ƒ Newsgroup.

(105)

Questions, Answers and Discussion

ƒ Is there a real requirement in industry for logging and monitoring

tooling?

ƒ What are some common PD activities?

ƒ Are there viable proprietary extensions to the TPTP logging and

monitoring tooling?

ƒ Possible suggestions for enhancements for the existing TPTP

logging and monitoring tooling.

(106)

IBM Sessions at EclipseWorld

ƒ Tuesday:

ƒ

101: Creating Your First J2EE Web Application With Eclipse in 90 Minutes –

Lawrence Mandel and Jason Sholl

ƒ

102: Developing Applications With the Eclipse Rich Client Platform (RCP) – Chris

Laffra

ƒ

204: Developing Web Services With Eclipse – Arthur Ryman

ƒ

301: Power User Central: Getting the Most Out of Your Eclipse Experience –

Chris Laffra

ƒ

304: Using the TPTP Testing, Profiling and Monitoring Tools – Harm Sluiman

ƒ

406: Testing Tools Inside Eclipse – Joe Toomey

ƒ

Booth 103 in the Exhibit Hall (3:00 PM – 7:30 PM): Demonstrations and

information about IBM tools and applications using the Eclipse framework

ƒ Wednesday

ƒ

701: Building With the Data Tools Project – Der-Ping Chou

ƒ

Booth 103 in the Exhibit Hall (12:00 PM – 4:00 PM): Demonstrations and

information about IBM tools and applications using the Eclipse framework

(107)

IBM Sessions at EclipseWorld

ƒ The first 100 visitors to the IBM booth

will receive a 2005 developerWorks

Software Evaluation Kit on DVD.

ƒ Featuring:

ƒNew Rational tools: Rational Software

Architect, Rational Software Modeler,

Rational Application Developer, Rational

Functional Tester and Rational Web

Developer

ƒWebSphere tools: WSAD-Integration

Edition and Workplace Client, Micro

Edition and HATS Studio

ƒMiddleware from WebSphere, Lotus and

DB2 (WAS, Domino, DB2 UDB)

ƒTivoli Directory Server

ƒLinux & Windows platforms

(108)

Appendix 1 – Java Logging XML Log File

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE log SYSTEM "logger.dtd">

<log>

<record>

<date>2005-08-29T13:12:28</date>

<millis>1125335548000</millis>

<sequence>0</sequence>

<logger>eclipseworld.tutorial.demo</logger>

<level>FINE</level>

<class>eclipseworld.tutorial.demo.SimpleHTTPProxyServer</class>

<method>configure</method>

<thread>10</thread>

<message>Java Logging facility is configured from file

'server.properties'.</message>

</record>

</log>

(109)

Appendix 2 – logger.dtd

<!ELEMENT log (record*)>

<!ELEMENT record (date, millis, sequence, logger?, level, class?,

method?, thread?, message, key?, catalog?, param*, exception?)>

<!ELEMENT date (#PCDATA)>

<!ELEMENT millis (#PCDATA)>

<!ELEMENT sequence (#PCDATA)>

<!ELEMENT logger (#PCDATA)>

<!ELEMENT level (#PCDATA)>

<!ELEMENT class (#PCDATA)>

<!ELEMENT method (#PCDATA)>

<!ELEMENT thread (#PCDATA)>

<!ELEMENT message (#PCDATA)>

<!ELEMENT key (#PCDATA)>

<!ELEMENT catalog (#PCDATA)>

<!ELEMENT param (#PCDATA)>

<!ELEMENT exception (message?, frame+)>

<!ELEMENT frame (class, method, line?)>

<!ELEMENT line (#PCDATA)>

References

Related documents

Within five (5) days after the effective date of the contract, COMPANY shall notify CONTRACTOR in writing of the designated Company Representative that represents a party or

Solution: AVEVA’s Asset Life Cycle Information Management solution; AVEVA’s Control of Work solution; AVEVA Enterprise Asset Management™.. Asset Visualisation

Alas, the comprehensive engineering approach, with a focus on perceived quality as a vantage point for new product development, together with questions regarding the importance

Corrosion of Materials Other than Metal; Early Corrosion Studies; Fundamentals; Electrochemical Principles; Electromotive Force; Ionization; The Corrosion Cell; Oxidation and

◆ Auto-antifreeze: To prevent the pipes and pumps from being frozen, the unit will defrost automatically when it meets the condition as follows: the ambient temperature is

Jacada WorkSpace is well suited for contact center environments where agents are either burdened with multiple desktop applications or where complex business rules (whether

Clustering techniques in wireless sensor networks enables energy efficient coordination among the densely deployed nodes for data delivery till the base station.. Many

In this paper we propose a secure and efficient off-line electronic payment system based on bilinear pairings and group signature schemes.. The anonymity of the customer is revocable