IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

22
Health Center 3.0.2 Runtime Monitoring for Java and Node.js

Transcript of IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

Page 1: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

Health Center 3.0.2Runtime Monitoring for Java and Node.js

Page 2: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 2

Very low overhead live monitoring capability for Java and Node.js● Pre-installed in IBM SDKs for Java since Java 5● Pre-installed in IBM SDKs for Node.js since v 1.1.0.10

Provides insight into runtime and application execution, including● Memory and CPU usage● Garbage Collection● Application execution

Visualization provided via Eclipse Client UI● Available from Eclipse Marketplace● Available from IBM Support Assistant

Data access API provided● Allows creation of custom monitoring tools● Full API Javadoc available

IBM Monitoring and Diagnostics: Health Center

Page 3: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 3

IBM Monitoring and Diagnostics: Health Center

Available for JavaAvailable for Node.js

Memory UtilizationDetect native memory leaks in applicationDetermine if external forces are using more memoryView components using the most native memory

Environment Hardware and Operating System ConfigurationProcess environment and configurationHighlights incorrect or non-standard configurations

CPU Utilization Visualizes process CPU usage over time Visualizes system CPU usage over time

Page 4: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 4

IBM Monitoring and Diagnostics: Health Center

Available for JavaAvailable for Node.js

Object AllocationsUnderstand types of data being allocatedDetermine which code is allocating data

ThreadsList of current threads and statesNumber of threads over timeSee contended monitors

Garbage CollectionVisualizes heap usage and GC pause timesIdentifies memory leaksSuggests command-line and tuning parameters

Page 5: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 5

IBM Monitoring and Diagnostics: Health Center

Available for JavaAvailable for Node.js

Lock ProfilingAlways-on lock monitoringAllows the usage of all locks to be profiledIdentifies points of contention that affect scaling

Live runtime controlTrigger dumpsEnable additional data collection

Method ProfilingAlways-on profiling shows application activityIdentifies the hottest methods in an applicationFull call stacks to identify where methods are being

called from and what methods they callNo byte code instrumentation, no recompiling

Page 6: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 6

PerformanceOverhead

Page 7: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 7

Performance Overhead (Java)

Measured using WebSphere App Server and the DayTrader benchmark with 50 clients

Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7

Throughput determined by number of completed transactions on 4 saturated CPUs

80

85

90

95

100

105

100

Baseline

Network Client

Headless

Headless with ZIP

Page 8: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 8

Performance Overhead (Java)

Measured using WebSphere App Server and the DayTrader benchmark with 50 clients

Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7

Throughput determined by number of completed transactions on 4 saturated CPUs

80

85

90

95

100

105

100.4

Baseline

Network Client

Headless

Headless with ZIP

Page 9: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 9

Performance Overhead (Java)

Measured using WebSphere App Server and the DayTrader benchmark with 50 clients

Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7

Throughput determined by number of completed transactions on 4 saturated CPUs

80

85

90

95

100

105

99.01

Baseline

Network Client

Headless

Headless with ZIP

Page 10: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 10

Performance Overhead (Java)

Measured using WebSphere App Server and the DayTrader benchmark with 50 clients

Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7

Throughput determined by number of completed transactions on 4 saturated CPUs

80

85

90

95

100

105

96.99

Baseline

Network Client

Headless

Headless with ZIP

Page 11: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 11

DeployingHealth Center

Page 12: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 12

IBM SDK for Java:

● Using Command line:Add -Xhealthcenter option

● Using “late attach”java -jar healthcenter.jar -PID=<pid>

Starting Health Center

IBM SDK for Node.js:

● Command line:Use node-hc executable

● Programmatically:require(“/usr/local/lib/node_modules

/healthcenter”).start()

Available for JavaAvailable for Node.js

Page 13: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 13

Point to Point● Using JMX connection directly to application

Publish/Subscribe● Using MQTT messages and a pub/sub broker

Deployment Modes

Available for JavaAvailable for Node.js

Pub/Sub BrokerTopic namespace:

/ibm/healthcenter/<namespace>/<agent_id>/<datatype>

Node.js

Application

LibertyJava (J9)

Application

LibertyJava (J9)

ApplicationJMX

MQTT

MQTT

MQTT

MQTT

MQTT

Page 14: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 14

Health Centerin IBM Bluemix

Page 15: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 15

Requires the use of Publish/SubscribeRequires an available MQTT broker. Options are:● Use IBM Containers service to deploy your own broker using Docker

● 2GB of memory, 8 containers and 2 IP addresses on free tier● Unlimited usage, complete control over configuration and access controls

● Use CloudMQTT service● 10 connections and 10 Kbit/second on free tier

● Use SoftLayer to deploy your own broker as a VM● $27.60/month for 1 core/1GB of memory● complete control over configuration and access controls

Using Health Center in IBM Bluemix

Available for JavaAvailable for Node.js

Page 16: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 16

● Log into Bluemix and request the IBM Containers service● Follow “Getting started with Containers” to install ICE and the Docker tools● Log-in to the IBM Containers service:

ice login -k [key] -H https://api-ice.ng.bluemix.net/v1.0/containers -R registry-ice.bluemix.net

● Download the default IBM Node.js image:ice –local pull registry-ice.bluemix.net/ibmnode

● Create an application directory with the following files (available in next slides):broker.jspackage.jsonDockerfile

● Run: docker build -t broker .● Run: docker tag broker registry-ice.ng.bluemix.net/[namespace]/broker● Run: ice –local push registry-ice.ng.bluemix.net/[namespace]/broker● Run: ice run --name broker registry-ice.ng.bluemix.net/[namespace]/broker● Run: ice ip request● Run: ice ip bind [ip_address] broker

Deploying a MQTT broker using IBM Containers service

Page 17: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 17

Source for broker.js

var mosca = require('mosca');

var createBroker = function () {var ascoltatore = {};

var settings = {port: 9080,backend: ascoltatore

};

var server = new mosca.Server(settings); server.on('ready', function() {

console.log('Mosca broker is up and running');});

server.authenticate = function(client, username, password, callback) {if (username == 'bailey' && password == 'secret') {

console.log('[Autenticate] Authenticated request from ' + client.id);callback(null, true);

} else {callback(null, false);console.log('[Autenticate] Rejected request from ' + client.id');

}};

};

broker = createBroker();

Page 18: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 18

Source for package.json

{ "name": "broker", "version": "0.0.1", "private": true, "scripts": { "start": "node broker.js" }, "dependencies": { "mosca": "*" }}

Page 19: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 19

Source for Dockerfile

FROM registry-ice.ng.bluemix.net/ibmnode COPY . /src

RUN cd src && \ npm install -d --production

EXPOSE 9080 CMD ["node", "src/broker.js"]

Page 20: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 20

IBM Developer Kits for Javaibm.biz/javasdk

WebShere Liberty Profilewasdev.net

IBM Bluemixibm.com/bluemix

IBM Developer Kits for Node.jsibm.biz/nodesdk

Page 21: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 21

References

• IBM Monitoring and Diagnostics - Health Center:• https://www.ibm.com/developerworks/java/jdk/tools/healthcenter/

• IBM SDKs for Java:• https://www.ibm.com/developerworks/java/jdk/

• IBM SDKs for Node.js:• http://www.ibm.com/developerworks/web/nodesdk/

Page 22: IBM Monitoring and Diagnostics Tools - Health Center 3.0.2

© 2014 International Business Machines Corporation 22

Copyrights and Trademarks

© IBM Corporation 2014. All Rights Reserved

IBM, the IBM logo, ibm.com are trademarks or registered

trademarks of International Business Machines Corp.,

registered in many jurisdictions worldwide. Other product and

service names might be trademarks of IBM or other companies.

A current list of IBM trademarks is available on the Web at

“Copyright and trademark information” at

www.ibm.com/legal/copytrade.shtml

Node.js is an official trademark of Joyent. IBM SDK for Node.js is not formally related to or endorsed by the official Joyent Node.js open source or

commercial project.

Java, JavaScript and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.