Submit Search
Upload
Troubleshooting Tools In JDK
•
1 like
•
201 views
Poonam Bajaj Parhar
Follow
CodeOne 2019 presentation on 'Troubleshooting Tools In JDK'
Read less
Read more
Technology
Report
Share
Report
Share
1 of 69
Download now
Download to read offline
Recommended
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Haribabu Nandyal Padmanaban
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java Applications
Poonam Bajaj Parhar
QA. Load Testing
QA. Load Testing
Alex Galkin
Client-Side Performance Testing
Client-Side Performance Testing
Anand Bagmar
How to Analyze Reports in Jmeter
How to Analyze Reports in Jmeter
Viviana Lesmes
Introduction to jest
Introduction to jest
pksjce
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
Michel Schildmeijer
Jira as a Tool for Test Management
Jira as a Tool for Test Management
Maija Laksa
Recommended
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Haribabu Nandyal Padmanaban
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java Applications
Poonam Bajaj Parhar
QA. Load Testing
QA. Load Testing
Alex Galkin
Client-Side Performance Testing
Client-Side Performance Testing
Anand Bagmar
How to Analyze Reports in Jmeter
How to Analyze Reports in Jmeter
Viviana Lesmes
Introduction to jest
Introduction to jest
pksjce
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
Michel Schildmeijer
Jira as a Tool for Test Management
Jira as a Tool for Test Management
Maija Laksa
Welcome to the Jungle - A safari through the JVM landscape
Welcome to the Jungle - A safari through the JVM landscape
Gerrit Grunwald
Up is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and Right
enigma0x3
The Many Ways to Test Your React App
The Many Ways to Test Your React App
All Things Open
Basic of jMeter
Basic of jMeter
Shub
Oracle Web Logic server
Oracle Web Logic server
Rakesh Gujjarlapudi
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Gayle McDowell
Jest
Jest
Lucas Lira Gomes
Types of performance testing
Types of performance testing
NaveenKumar Namachivayam
Performance Tuning - Understanding Garbage Collection
Performance Tuning - Understanding Garbage Collection
Haribabu Nandyal Padmanaban
SLF4J (Simple Logging Facade for Java)
SLF4J (Simple Logging Facade for Java)
Guo Albert
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri
Logback
Logback
Anubhav Shukla
Maven tutorial
Maven tutorial
Dragos Balan
Maven ppt
Maven ppt
natashasweety7
Teste de performance com JMeter: como criar e executar os testes em aplicaçõe...
Teste de performance com JMeter: como criar e executar os testes em aplicaçõe...
Edlaine Zamora
Workshop unit test
Workshop unit test
Francesco Garavaglia
Load Testing Strategy 101
Load Testing Strategy 101
iradari
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
Ahmed El-Arabawy
Performance testing with Apache JMeter
Performance testing with Apache JMeter
RedBlackTree
testng
testng
harithakannan
Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9
Poonam Bajaj Parhar
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
Alexandre (Shura) Iline
More Related Content
What's hot
Welcome to the Jungle - A safari through the JVM landscape
Welcome to the Jungle - A safari through the JVM landscape
Gerrit Grunwald
Up is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and Right
enigma0x3
The Many Ways to Test Your React App
The Many Ways to Test Your React App
All Things Open
Basic of jMeter
Basic of jMeter
Shub
Oracle Web Logic server
Oracle Web Logic server
Rakesh Gujjarlapudi
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Gayle McDowell
Jest
Jest
Lucas Lira Gomes
Types of performance testing
Types of performance testing
NaveenKumar Namachivayam
Performance Tuning - Understanding Garbage Collection
Performance Tuning - Understanding Garbage Collection
Haribabu Nandyal Padmanaban
SLF4J (Simple Logging Facade for Java)
SLF4J (Simple Logging Facade for Java)
Guo Albert
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri
Logback
Logback
Anubhav Shukla
Maven tutorial
Maven tutorial
Dragos Balan
Maven ppt
Maven ppt
natashasweety7
Teste de performance com JMeter: como criar e executar os testes em aplicaçõe...
Teste de performance com JMeter: como criar e executar os testes em aplicaçõe...
Edlaine Zamora
Workshop unit test
Workshop unit test
Francesco Garavaglia
Load Testing Strategy 101
Load Testing Strategy 101
iradari
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
Ahmed El-Arabawy
Performance testing with Apache JMeter
Performance testing with Apache JMeter
RedBlackTree
testng
testng
harithakannan
What's hot
(20)
Welcome to the Jungle - A safari through the JVM landscape
Welcome to the Jungle - A safari through the JVM landscape
Up is Down, Black is White: Using SCCM for Wrong and Right
Up is Down, Black is White: Using SCCM for Wrong and Right
The Many Ways to Test Your React App
The Many Ways to Test Your React App
Basic of jMeter
Basic of jMeter
Oracle Web Logic server
Oracle Web Logic server
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Cracking the Interview Skills (Coding, Soft Skills, Product Management) Handouts
Jest
Jest
Types of performance testing
Types of performance testing
Performance Tuning - Understanding Garbage Collection
Performance Tuning - Understanding Garbage Collection
SLF4J (Simple Logging Facade for Java)
SLF4J (Simple Logging Facade for Java)
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Logback
Logback
Maven tutorial
Maven tutorial
Maven ppt
Maven ppt
Teste de performance com JMeter: como criar e executar os testes em aplicaçõe...
Teste de performance com JMeter: como criar e executar os testes em aplicaçõe...
Workshop unit test
Workshop unit test
Load Testing Strategy 101
Load Testing Strategy 101
Course 102: Lecture 12: Basic Text Handling
Course 102: Lecture 12: Basic Text Handling
Performance testing with Apache JMeter
Performance testing with Apache JMeter
testng
testng
Similar to Troubleshooting Tools In JDK
Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9
Poonam Bajaj Parhar
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
Alexandre (Shura) Iline
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
Wolfgang Weigend
JVMs in Containers - Best Practices
JVMs in Containers - Best Practices
David Delabassee
Production Time Profiling Out of the Box
Production Time Profiling Out of the Box
Marcus Hirt
JVMs in Containers
JVMs in Containers
David Delabassee
Diagnosing Your Application on the JVM
Diagnosing Your Application on the JVM
Staffan Larsen
ASML_FlightRecorderMeetsJava.pdf
ASML_FlightRecorderMeetsJava.pdf
Miro Wengner
DevDays: Profiling With Java Flight Recorder
DevDays: Profiling With Java Flight Recorder
Miro Wengner
Splunk Conf 2014 - Splunking the Java Virtual Machine
Splunk Conf 2014 - Splunking the Java Virtual Machine
Damien Dallimore
Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40
Roger Brinkley
JDK 10 Java Module System
JDK 10 Java Module System
Wolfgang Weigend
Why should i switch to Java SE 7
Why should i switch to Java SE 7
Vinay H G
Java mission control and java flight recorder
Java mission control and java flight recorder
Wolfgang Weigend
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java Tools
Chris Bailey
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
DanHeidinga
Graal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian Wimmer
Thomas Wuerthinger
2015 Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
Trisha Gee
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
Shaun Smith
A Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
Ana-Maria Mihalceanu
Similar to Troubleshooting Tools In JDK
(20)
Monitoring and Troubleshooting Tools in Java 9
Monitoring and Troubleshooting Tools in Java 9
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
JVMs in Containers - Best Practices
JVMs in Containers - Best Practices
Production Time Profiling Out of the Box
Production Time Profiling Out of the Box
JVMs in Containers
JVMs in Containers
Diagnosing Your Application on the JVM
Diagnosing Your Application on the JVM
ASML_FlightRecorderMeetsJava.pdf
ASML_FlightRecorderMeetsJava.pdf
DevDays: Profiling With Java Flight Recorder
DevDays: Profiling With Java Flight Recorder
Splunk Conf 2014 - Splunking the Java Virtual Machine
Splunk Conf 2014 - Splunking the Java Virtual Machine
Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40
JDK 10 Java Module System
JDK 10 Java Module System
Why should i switch to Java SE 7
Why should i switch to Java SE 7
Java mission control and java flight recorder
Java mission control and java flight recorder
Impact2014: Introduction to the IBM Java Tools
Impact2014: Introduction to the IBM Java Tools
JavaOne 2016: Life after Modularity
JavaOne 2016: Life after Modularity
Graal Tutorial at CGO 2015 by Christian Wimmer
Graal Tutorial at CGO 2015 by Christian Wimmer
2015 Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
A Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
Recently uploaded
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Alan Dix
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
ThousandEyes
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
XfilesPro
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
Recently uploaded
(20)
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Troubleshooting Tools In JDK
1.
1 Monitoring and Troubleshooting Tools
in JDK ‘bin’ Poonam Parhar Copyright © 2019 Oracle and/or its affiliates. Consulting Member of Technical Staff JVM Sustaining Engineer, Oracle
2.
The following is
intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Safe Harbor Copyright © 2019 Oracle and/or its affiliates.
3.
What is Troubleshooting
? • Systematic approach to solving problems • Three simple steps: • 1. Understand the problem/error • 2. Collect the required diagnostic data • 3. Analyze the collected data Good Troubleshooting tools are our friends! Copyright © 2019 Oracle and/or its affiliates.
4.
JDK Troubleshooting/Monitoring Tools •
Tools that allow us to • Monitor Java applications • Profile Java applications • Extract useful diagnostic information from Java applications • Analyze diagnostic data • Even perform after-the-fact analysis • Can work locally or remotely Copyright © 2019 Oracle and/or its affiliates.
5.
Agenda • Tools available
in JDK ‘bin’ folder • Monitoring Tools • Troubleshooting Tools • Newly Added Tools • Decommissioned Tools Copyright © 2019 Oracle and/or its affiliates.
6.
Monitoring Tools • jconsole
- Starts a graphic console to monitor and manage Java applications. • jps - Experimental: Lists the instrumented Java Virtual Machines (JVMs) on the target system. • jstat - Experimental: Monitors JVM statistics • jstatd - Experimental: Monitors JVMs and enables remote monitoring tools to attach to JVMs. • jmc – Java Mission Control: JMX console, and JFR recording and analysis tool Open sourced and is not shipped with Oracle JDK Copyright © 2019 Oracle and/or its affiliates.
7.
JConsole • JConsole is
a GUI based monitoring tool for Java applications • JMX client • Helps in monitoring and managing • Java Applications and the JVM • Local and remote applications • jconsole executable available in JDK/bin • Using jConsole locally is not recommended for production environments • For remote monitoring: • com.sun.management.jmxremote.port=portNum Copyright © 2019 Oracle and/or its affiliates.
8.
Java Application JMX Client Application Instrumented JVM JMX Agent MBean Server MBean MBean MBean Copyright © 2019
Oracle and/or its affiliates.
9.
Copyright © 2019
Oracle and/or its affiliates.
10.
Copyright © 2019
Oracle and/or its affiliates.
11.
Copyright © 2019
Oracle and/or its affiliates.
12.
Copyright © 2019
Oracle and/or its affiliates.
13.
Copyright © 2019
Oracle and/or its affiliates.
14.
Copyright © 2019
Oracle and/or its affiliates.
15.
jps (experimental) –
Java Process Status tool • Lists the JVMs running on the system • Obtains processes information from /tmp/hsperfdata_user/<pid> files • List of the JVMs reported can be limited by the OS level permissions granted to the user • Can list the JVMs on local or remote hosts • For remote monitoring ‘jstatd’ should be running on the remote system • Accepts optional argument <protocol:><//hostname>:[<port>] • On local hosts, the VM identifier is typically the OS process id of the application Copyright © 2019 Oracle and/or its affiliates.
16.
$ jps -h illegal
argument: -h usage: jps [-help] jps [-q] [-mlvV] [<hostid>] Definitions: <hostid>: <hostname>[:<port>] $ jps -m 9848 GCBasher.jar -time:100000000 7084 Jps –m $ jps -l 3056 jdk.jcmd/sun.tools.jps.Jps 9848 GCBasher.jar $ jps -v 6324 Jps -Dapplication.home=d:Javajdk-9 -Xms8m -Djdk.module.main=jdk.jcmd 9848 GCBasher.jar C:Userspobajaj.ORADEV>jps -q 9876 9848 jps examples Copyright © 2019 Oracle and/or its affiliates.
17.
jstat (experimental) –
JVM Statistics • Tool to monitor JVM statistics • Performance statistics about HotSpot JVM • Reads information from /tmp/hsperfdata_user/<pid> file • Accepts various options to print statistics about different components of the JVM • class, compiler, gc, gccapacity, gccause, gcnew, gcnewcapacity, gcold, gcoldcapacity, gcmetacapacity, gcutil, printcompilation • For remote monitoring ‘jstatd’ must be running on the remote system • Accepts optional argument <protocol:><//hostname>:[<port>] Copyright © 2019 Oracle and/or its affiliates.
18.
jstatd (experimental) -
jstat Daemon • Launches an RMI server application that monitors the creation and termination of HotSpot JVM based java applications • Provides an interface to allow remote monitoring tools to attach to Java virtual machines running on the system • Note: There is no encryption or authentication with jstatd Copyright © 2019 Oracle and/or its affiliates.
19.
Monitoring Tools • jconsole
- Starts a graphic console to monitor and manage Java applications. • jps - Experimental: Lists the instrumented Java Virtual Machines (JVMs) on the target system. • jstat - Experimental: Monitors JVM statistics • jstatd - Experimental: Monitors JVMs and enables remote monitoring tools to attach to JVMs. Copyright © 2019 Oracle and/or its affiliates.
20.
Troubleshooting Tools • jcmd
– Sends diagnostic commands to a running JVM • jdb – java platform debugger • jinfo – Experimental: Obtains and updates configuration information • jmap – Experimental: Can create heap dumps or heap histograms for a java process • jstack – Experimental: Prints Java thread stack traces for a Java process • jhsdb – Attaches to a hanging process or a crash dump file for postmortem analysis • jfr – command line tool to analyze JFR recording files New tool in JDK 9 New diagnostic commands New tool in JDK 12 Copyright © 2019 Oracle and/or its affiliates.
21.
jcmd – Java
Command • Java Diagnostic Command utility • Utility to send diagnostic commands to a running JVM • Uses Attach API to execute d-commands (helper routines) in the JVM • Can be used only on the same local machine as the target JVM Copyright © 2019 Oracle and/or its affiliates.
22.
jcmd: popular commands •
jcmd <process id/main class> VM.version • jcmd <process id/main class> VM.system_properties • jcmd <process id/main class> VM.flags • jcmd <process id/main class> GC.class_histogram • jcmd <process id/main class> GC.class_stats • jcmd <process id/main class> GC.heap_dump filename=heapdump • jcmd <process id/main class> Thread.print Copyright © 2019 Oracle and/or its affiliates.
23.
jcmd: Java Flight
Recordings commands • jcmd <process id/main class> JFR.start name=MyRecording settings=profile delay=20s duration=2m filename=/tmp/myrecording.jfr • jcmd <process id/main class> JFR.check • jcmd <process id/main class> JFR.stop • jcmd <process id/main class> JFR.dump name=MyRecording filename=/tmp/myrecording.jfr Copyright © 2019 Oracle and/or its affiliates.
24.
Copyright © 2019
Oracle and/or its affiliates.
25.
Copyright © 2019
Oracle and/or its affiliates.
26.
Copyright © 2019
Oracle and/or its affiliates.
27.
Copyright © 2019
Oracle and/or its affiliates.
28.
Copyright © 2019
Oracle and/or its affiliates.
29.
jcmd Attach API Diagnostic Routines Commands Output Local machine Copyright ©
2019 Oracle and/or its affiliates.
30.
jdb – Java
Debugger • Command-line debugger for Java Class files • jdb <options> <class> <arguments> • Uses Java Debug Interface (JDI) • JDI is a component of Java Platform Debugger Architecture (JPDA) • Can perform inspection and debugging of a local or remote Java Virtual Machine Copyright © 2019 Oracle and/or its affiliates.
31.
jinfo jmap jstack Local live process Core dump file Remote Debug ServerJDK 8 JDK 9+ Serviceability Agent Attach API Copyright © 2019
Oracle and/or its affiliates.
32.
jinfo – Java
Configuration Information • Configuration (flags) information of a running Java process • Can update the manageable flags at runtime • It can: • Print the value of a VM flag • Enable or disable a specified VM flag • Set the value of a VM flag • Print VM flags and system properties Copyright © 2019 Oracle and/or its affiliates.
33.
jmap (experimental) –
Java Memory Map • Heap objects information and Heap dumps • Classloader Statistics • -clstats <pid> • Finalization Information • -finalizerinfo <pid> • Class Histograms • -histo[:live] <pid> • Heap Dumps • -dump:<dump-options> <pid> • JDK 9 removed: heap info and shared memory mappings Copyright © 2019 Oracle and/or its affiliates.
34.
jstack (experimental) –
Java Stack • Thread dump • Deadlock detection • jstack –l to see the concurrent locks information • Removed support for –F and –m options Copyright © 2019 Oracle and/or its affiliates.
35.
jcmd – comparison
with old tools jcmd Individual tools Function jcmd without any argument jps List Java Processes jcmd with VM.system_properties, VM.flags, VM.set_flag jinfo VM Configuration jcmd with GC.class_stats, GC.class_histogram, GC.heap_dump, GC.finalizer_info jmap Generate Heap Dump and Class Histogram, get Class Statistics and Finalization information jcmd with Thread.print jstack Thread Dump jcmd PerfCounter.print jstat Print Performance Counters Copyright © 2019 Oracle and/or its affiliates.
36.
jhsdb- Java HotSpot
Debugger • Can be used to launch a postmortem debugger (SA) to analyze core dump files • Can be used for live java processes too • jhsdb clhsdb [--pid pid | --exe executable --core coredump] • jhsdb debugd [options] pid [server-id]|[option] executable core [server-id] • jhsdb hsdb [--pid pid | --exe executable --core coredump] • jhsdb jstack [--pid pid | --exe executable --core coredump] [options] • jhsdb jmap [--pid pid | --exe executable --core coredump] [options] • jhsdb jinfo [--pid pid | --exe executable --core coredump] [options] • jhsdb jsnap [options] [--pid pid | --exe executable --core coredump] Copyright © 2019 Oracle and/or its affiliates.
37.
jinfo jmap jstack Local live process Core dump file Remote Debug Server JDK 9+ Serviceability Agent Attach API Copyright © 2019
Oracle and/or its affiliates.
38.
jhsdb Local live process Core dump file Remote Debug Server JDK 9+ Serviceability Agent Non-cooperative manner Copyright © 2019
Oracle and/or its affiliates.
39.
Copyright © 2019
Oracle and/or its affiliates.
40.
Copyright © 2019
Oracle and/or its affiliates.
41.
Copyright © 2019
Oracle and/or its affiliates.
42.
Copyright © 2019
Oracle and/or its affiliates.
43.
Copyright © 2019
Oracle and/or its affiliates.
44.
Copyright © 2019
Oracle and/or its affiliates.
45.
Copyright © 2019
Oracle and/or its affiliates.
46.
Copyright © 2019
Oracle and/or its affiliates.
47.
Copyright © 2019
Oracle and/or its affiliates.
48.
Copyright © 2019
Oracle and/or its affiliates.
49.
JFR Tool • Where GUI tools (e.g. JMC) can not be used •
https://bugs.openjdk.java.net/browse/JDK-8205516 • Available since JDK 12 • Will also be available in 11.0.6 Oracle JDK Copyright © 2019 Oracle and/or its affiliates.
50.
Copyright © 2019
Oracle and/or its affiliates.
51.
JFR Tool Commands jfr
print recording.jfr jfr print --events CPULoad,GarbageCollection recording.jfr jfr print --json --events CPULoad recording.jfr jfr print --categories "GC,JVM,Java*" recording.jfr jfr print --events "jdk.*" --stack-depth 64 recording.jfr jfr summary recording.jfr jfr metadata recording.jfr Copyright © 2019 Oracle and/or its affiliates.
52.
Troubleshooting Tools • jcmd
– Sends diagnostic commands to a running JVM • jdb – java platform debugger • jinfo – Experimental: Generates configuration information • jmap – Experimental: Can create heap dumps or heap histograms for a java process • jstack – Experimental: Prints Java thread stack traces for a Java process • jhsdb – Attaches to a hanging process or a crash dump file for postmortem analysis • jfr – command line tool to analyze JFR recording files Copyright © 2019 Oracle and/or its affiliates.
53.
Tools Removed in
JDKs • JDK 9 • Java VisualVM • jhat • jsadebugd • JDK 11 • jmc Copyright © 2019 Oracle and/or its affiliates.
54.
Java VisualVM • Not
included since JDK 9 • Open Source Project: https://visualvm.github.io/download.html • Other tools (profiling and live monitoring) available: Java Mission Control, JConsole • Several Open Source heap dumps analysis tools available • Eclipse MAT Copyright © 2019 Oracle and/or its affiliates.
55.
jhat • Removed in
JDK 9 • Web application that can be launched with the ‘jhat’ command available in the JDK/bin folder • Enables heap dump analysis by browsing objects in the heap dump using any web browser • By default the web server is started at port 7000. • jhat supports a wide range of pre-designed queries and Object Query Language(OQL) to explore the objects in heap dumps • Several other heap dump analysis tools available Copyright © 2019 Oracle and/or its affiliates.
56.
jsadebugd • Removed in
Java 9 • Attaches to a Java process or core file and acts as a debug server • Up until JDK 8, tools such as jstack, jmap, and jinfo could remotely attach to a debug server using Java RMI • The debug server can now be launched with ‘jhsdb debugd’ Copyright © 2019 Oracle and/or its affiliates.
57.
JMC - Java
Mission Control • Open Sourced: http://hg.openjdk.java.net/jmc • Building JMC: http://hirt.se/blog/?p=947 • Not available in ‘bin’ since JDK 11 • Non-intrusive, low-overhead tool to monitor, manage and profile Java applications • Suitable for production environments • JMC Tools Chain • JMX Console • Monitoring and managing live java applications • JMX MBeans Browser • Java Flight Recorder • Engine built in the Java Runtime • Record interesting events at the application and the JVM level • Compact binary proprietary format • Tracking events leading up to a problem provides great help in troubleshooting Copyright © 2019 Oracle and/or its affiliates.
58.
Copyright © 2019
Oracle and/or its affiliates.
59.
Copyright © 2019
Oracle and/or its affiliates.
60.
Copyright © 2019
Oracle and/or its affiliates.
61.
Copyright © 2019
Oracle and/or its affiliates.
62.
Copyright © 2019
Oracle and/or its affiliates.
63.
Copyright © 2019
Oracle and/or its affiliates.
64.
Copyright © 2019
Oracle and/or its affiliates.
65.
Copyright © 2019
Oracle and/or its affiliates.
66.
Copyright © 2019
Oracle and/or its affiliates.
67.
Update on JFR •
JEP 328: Flight Recorder • JFR open sourced in JDK 11 • Was a commercial feature earlier, and needed commercial license and - XX:+UnlockCommercialFeatures option • Flight Recorder API • Added in JDK 9 • Old Object Sample Event (Memory Leak Profiler) • Added in JDK 10 • Marcus’s blog post: http://hirt.se/blog/?p=1055 • Performance enhancements in data collection and recording • Ability to dump recordings even at VM crashes or OOMs • Improved and new Events (safepoint, codecache, compiler, G1, module) Copyright © 2019 Oracle and/or its affiliates.
68.
Summary • Enhanced Tools •
jcmd – we encourage to use this tool instead of other individual tools • New Tools • jfr tool • jhsdb for postmortem analysis • Removed Tools • Java VisualVM • jhat • jsadebugd • jmc Copyright © 2019 Oracle and/or its affiliates.
69.
69 Monitoring and Troubleshooting Tools
in JDK ‘bin’ Poonam Parhar Consulting Member of Technical Staff JVM Sustaining Engineer, Oracle Copyright © 2019 Oracle and/or its affiliates.
Download now