an open source instrumentation tool for the hotspot...
TRANSCRIPT
Thermostat
An Open SourceInstrumentation Tool for theHotspot JVM
Severin Gehwolf, Red HatMario Torre, Red Hat
Developer Conference 2013
2/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Agenda
● What is it exactly this Thermostat?● How does Thermostat work?● Current and upcoming features● Thermostat plug-ins 101● Demo/Hack Session
3
The Tool Explained(a.k.a. What is this tool exactly?)
4/34 Severin Gehwolf & Mario Torre Feb 23, 2013
What is Thermostat?
Monitoring
Diagnostics
Tuning
Profiling
OpenSource
OpenJDK
5/34 Severin Gehwolf & Mario Torre Feb 23, 2013
What is Thermostat?
Monitoring
Diagnostics
Tuning
Profiling
OpenSource
OpenJDK
Information Hub
6/34 Severin Gehwolf & Mario Torre Feb 23, 2013
What is Thermostat?
AS
JVM
OS
7/34 Severin Gehwolf & Mario Torre Feb 23, 2013
What is Thermostat?
AS
JVM
OS
Vertical Integration
8/34 Severin Gehwolf & Mario Torre Feb 23, 2013
What is Thermostat?
Local Remote Cluster Cloud?
9/34 Severin Gehwolf & Mario Torre Feb 23, 2013
What is Thermostat?
Horizontal Integration
10/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Lines of Code
Source: https://www.ohloh.net/p/thermostat-monitoring-tool
11/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Commits Per Month
Source: https://www.ohloh.net/p/thermostat-monitoring-tool
12
Current and Upcoming Features
13/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Current Features
● CPU monitoring
● Memory usage
● GC invocations
● Thread monitoring
● Heap dump analysis
● Classloader information
● Numa
14/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Upcoming Features
● Finish NUMA support● JVM tuning● Systemtap / oprofile backend● Memory leak & deadlock analysis● Eclipse client/IDE integration● Web client● Host / JVM issues overview● Open Shift deployment. Maybe?
15
Cool!How Does It Work?
16/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Agent, Client, Storage Approach
17/34 Severin Gehwolf & Mario Torre Feb 23, 2013
How Does It Work?
Agents
18/34 Severin Gehwolf & Mario Torre Feb 23, 2013
How Does It Work?
Storage
19/34 Severin Gehwolf & Mario Torre Feb 23, 2013
How Does It Work?
Clients
20/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Where Is The Data Coming From?
● JvmStat
● JMX
● /proc
● Systemtap
● Oprofile
● App Server
21/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Where Is The Data Coming From?
● JvmStat
● JMX
● /proc
● Systemtap
● Oprofile
● App Server
At Present
In Future
22
Plug-in 101
23/34 Severin Gehwolf & Mario Torre Feb 23, 2013
The Basics (1)
● Extensible through plug-ins
● OSGi
● Write your own agent extensions
● Write your own client extensions
● plugin.xml file tells Thermostat about your new
bundles
24/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Recall...
Agents
25/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Agent Extensions
Numa
Backends
26/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Storage Extensions
NumaDAO
DAOs
27/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Client Extensions
InformationService
VmRef HostRef
28/34 Severin Gehwolf & Mario Torre Feb 23, 2013
The Basics (2)
● Backend's extend agents
● Data Access Objects (DAO) extend Storage
● InformationService's extend GUI
● Can bind UI to...
– HostRef (a specific host/agent)
– VmRef (a specific JVM)
29/34 Severin Gehwolf & Mario Torre Feb 23, 2013
plugin.xml<?xml version="1.0" ?><plugin> <commands> <command type="extends"> <name>gui</name> <bundles> <bundle>your-plugin-0.1-SNAPSHOT.jar</bundle> </bundles> </command> <command type="provides"> <name>hello</name> <description>Prints hello</description> <usage>hello</usage> <bundles> <bundle>your-hello-world-plugin-0.1-SNAPSHOT.jar</bundle> </bundles> <dependencies> <dependency>thermostat-client-core-0.6.0-SNAPSHOT.jar</dependency> </dependencies> </command> </commands></plugin>
30
Questions?
31/34 Severin Gehwolf & Mario Torre Feb 23, 2013
Why This New Tool?
● Scalability● Avoiding unwanted dependencies.● Written in Java, by Java devs, for Java devs.● Flexible data model● Developer ego (This is joke. You laugh
now).
32
Demo/Hack Session Time!
33/34 Severin Gehwolf & Mario Torre Feb 23, 2013
References
● Homepage: http://icedtea.classpath.org/thermostat/
● Code: http://icedtea.classpath.org/hg/thermostat
● Mailing list: http://icedtea.classpath.org/mailman/listinfo/thermostat
● IRC: #thermostat on freenode.net
● Duke images from around the net
● http://jroller.com/neugens/entry/thermostat_scheduler_plugin_a_walk
34
Thank You!Kudos to Mario and Omair for providing most of the plug-in code!