SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
The Developer Swiss Knife: Troubleshooting
Tools for Java EE Applications
Assumptions
•This presentation aims experienced developers
with a little (but good) knowledge about how the
JVM works
•The presentation focus only on the tools, not on
the troubleshooting methods
•Some of the tools are only for Linux. Windows
users, get out! =P
•All tools presented in this presentation are Open
Source projects and some of them are
developed by JBoss
The Application stack
Our primary focus
The Tools
•JDK CLI Tools (jstack, jmap, jps, etc.)
•JDK GUI Tools (JVisualVM, JConsole)
•Eclipse Memory Analyzer Tool (MAT)
•Thermostat
•Garbagecat
•Samurai
•AS7 JDR (JBoss Disaster Report) tool
•Tattletale
•Byteman*
JDK has its own troubleshooting tools
● jps
● jmap
● jinfo
● jhat
● jstack
Some of them are Graphical
● JConsole
● JVisualVM
What should I do when my application has a
memory problem?
Generating a Heap Dump
● -XX:-HeapDumpOnOutOfMemoryError
● jmap
● JVisualVM
Ok, I have a Heap Dump. Now can I analyze it?
Meet Eclipse MAT
What should I do if my application have a CPU
problem? e.g. High CPU consumption
Generating a Thread Dump
● jstack
● kill -3
● AS7 CLI command:
– /core-service=platform-
mbean/type=threading:dump-all-threads(locked-
monitors=true,locked-synchronizers=true)
Now with a Thread Dump, what should I do with
it?
Samurai – A Thread Dump viewer
High CPU consumption can be high GC activity
Enabling GC Logging
● Add to java command:
-XX:+PrintGC -Xloggc:gc.log -XX:+PrintGCDetails
-XX:+PrintGCTimeStamps
GC Log content
3.122: [GC 132096K->24592K(504320K), 0.0321910 secs]
4.558: [GC 156688K->26752K(504320K), 0.0340520 secs]
6.609: [GC 158848K->50117K(504320K), 0.0628430 secs]
7.077: [GC 80334K->54921K(504320K), 0.0416730 secs]
7.119: [Full GC 54921K->46716K(504320K), 0.2522170 secs]
8.510: [GC 178812K->60924K(504320K), 0.0190690 secs]
9.683: [GC 193020K->69447K(461696K), 0.0308020 secs]
Garbagecat
java -jar garbagecat-1.0.0.jar --help
usage: garbagecat [OPTION]... [FILE]
-h,--help help
-o,--options <arg> JVM options used during JVM run
-p,--preprocess preprocessing flag
-s,--startdatetime <arg> JVM start datetime (yyyy-MM-dd HH:mm:ss,SSS)
for converting GC logging timestamps to datetime
-t,--threshold <arg> threshold (0-100) for throughput bottleneck
reporting
Garbagecat report
========================================
Throughput less than 90% for PARALLEL_SCAVENGE
========================================
18020.492: [GC [PSYoungGen: 161888K->1376K(166016K)] 949359K->789159K(1214592K), 0.0294550 secs]
...
========================================
SUMMARY:
========================================
# GC Events: 46044
GC Event Types: PARALLEL_SCAVENGE, PARALLEL_SERIAL_OLD
Max Heap Space: 1566912K
Max Heap Occupancy: 1562164K
Max Perm Space: 77864K
Max Perm Occupancy: 46645K
Throughput: 99%
Max Pause: 4098 ms
Total Pause: 1703657 ms
First Timestamp: 4616 ms
Last Timestamp: 232465068 ms
========================================
0 UNIDENTIFIED LOG LINE(S):
Applications also might have classloading
problems
Tattletale
JBoss AS7 has JDR
Wait a minute! I tried to run jvisualvm in OpenJDK
and it says “command not found”
Thermostat – The next heat
Please Remember
● Don't develop applications without make use
of testing approaches (unit, integration,
functional, ...)
● Although all testing efforts, there is no 100%
bug free applications
● For all unpredictable and complex problems,
this presentation will help you troubleshoot, if
not all, most of the problem
The links
● http://icedtea.classpath.org/wiki/Thermostat
● http://eclipse.org/mat/
● http://yusuke.homeip.net/samurai/en/index.html
● https://code.google.com/a/eclipselabs.org/p/garbagecat/
● http://docs.oracle.com/javase/7/docs/index.html
● http://www.jboss.org/tattletale
● http://jboss.org/byteman
Twitter: @rimolive
http://aprendendo-cloud-computing.blogspot.com
Thank you!
What about Byteman?
Race Condition Tests with Byteman
Flávia Rainone
Don't miss it!

Mais conteúdo relacionado

Semelhante a Jud con presentation_brazil

Taming Java Garbage Collector
Taming Java Garbage CollectorTaming Java Garbage Collector
Taming Java Garbage CollectorDaya Atapattu
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance TuningJeremy Leisy
 
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsTroubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsPoonam Bajaj Parhar
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection TuningKai Koenig
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Tier1 App
 
Java Performance and Profiling
Java Performance and ProfilingJava Performance and Profiling
Java Performance and ProfilingWSO2
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
 
Become a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceBecome a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceTier1app
 
YOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceYOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceBrendan Gregg
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with MicronautQAware GmbH
 
look inside your (Liferay) portal
look inside your (Liferay) portallook inside your (Liferay) portal
look inside your (Liferay) portalIBACZ
 
Java gpu computing
Java gpu computingJava gpu computing
Java gpu computingArjan Lamers
 
Top-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptxTier1 app
 
Why you should be using structured logs
Why you should be using structured logsWhy you should be using structured logs
Why you should be using structured logsStefan Krawczyk
 
Become a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day DevopsBecome a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day DevopsTier1app
 
Javascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpJavascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpAll Things Open
 
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...Red Hat Developers
 

Semelhante a Jud con presentation_brazil (20)

Tools for Metaspace
Tools for MetaspaceTools for Metaspace
Tools for Metaspace
 
Le guide de dépannage de la jvm
Le guide de dépannage de la jvmLe guide de dépannage de la jvm
Le guide de dépannage de la jvm
 
Taming Java Garbage Collector
Taming Java Garbage CollectorTaming Java Garbage Collector
Taming Java Garbage Collector
 
JVM Performance Tuning
JVM Performance TuningJVM Performance Tuning
JVM Performance Tuning
 
Troubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java ApplicationsTroubleshooting Memory Problems in Java Applications
Troubleshooting Memory Problems in Java Applications
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection Tuning
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?
 
Java Performance and Profiling
Java Performance and ProfilingJava Performance and Profiling
Java Performance and Profiling
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
 
Become a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceBecome a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo Conference
 
YOW2020 Linux Systems Performance
YOW2020 Linux Systems PerformanceYOW2020 Linux Systems Performance
YOW2020 Linux Systems Performance
 
Microservices with Micronaut
Microservices with MicronautMicroservices with Micronaut
Microservices with Micronaut
 
look inside your (Liferay) portal
look inside your (Liferay) portallook inside your (Liferay) portal
look inside your (Liferay) portal
 
Java gpu computing
Java gpu computingJava gpu computing
Java gpu computing
 
Top-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptx
 
Why you should be using structured logs
Why you should be using structured logsWhy you should be using structured logs
Why you should be using structured logs
 
Become a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day DevopsBecome a Java GC Hero - All Day Devops
Become a Java GC Hero - All Day Devops
 
Qt5 on ti processors
Qt5 on ti processorsQt5 on ti processors
Qt5 on ti processors
 
Javascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and GulpJavascript TDD with Jasmine, Karma, and Gulp
Javascript TDD with Jasmine, Karma, and Gulp
 
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
How To Get The Most Out Of Your Hibernate, JBoss EAP 7 Application (Ståle Ped...
 

Mais de Ricardo Martinelli de Oliveira

Mensageria sob Demanda: Uma introdução ao MaaS (Messaging-as-a-Service)
Mensageria sob Demanda: Uma introdução ao MaaS (Messaging-as-a-Service)Mensageria sob Demanda: Uma introdução ao MaaS (Messaging-as-a-Service)
Mensageria sob Demanda: Uma introdução ao MaaS (Messaging-as-a-Service)Ricardo Martinelli de Oliveira
 
Novas oportunidades para o .net com a parceria microsoft e red hat
Novas oportunidades para o .net com a parceria microsoft e red hatNovas oportunidades para o .net com a parceria microsoft e red hat
Novas oportunidades para o .net com a parceria microsoft e red hatRicardo Martinelli de Oliveira
 
Byteman: Tudo o que queria saber mas não sabia a quem perguntar
Byteman: Tudo o que queria saber mas não sabia a quem perguntarByteman: Tudo o que queria saber mas não sabia a quem perguntar
Byteman: Tudo o que queria saber mas não sabia a quem perguntarRicardo Martinelli de Oliveira
 
De zero a cem em cloud computing transformando idéias em aplicações em pouco...
De zero a cem em cloud computing  transformando idéias em aplicações em pouco...De zero a cem em cloud computing  transformando idéias em aplicações em pouco...
De zero a cem em cloud computing transformando idéias em aplicações em pouco...Ricardo Martinelli de Oliveira
 
De zero a cem em cloud computing transformando idéias em aplicações em pouco...
De zero a cem em cloud computing  transformando idéias em aplicações em pouco...De zero a cem em cloud computing  transformando idéias em aplicações em pouco...
De zero a cem em cloud computing transformando idéias em aplicações em pouco...Ricardo Martinelli de Oliveira
 

Mais de Ricardo Martinelli de Oliveira (20)

Ensuring Software Quality in the cloud
Ensuring Software Quality in the cloudEnsuring Software Quality in the cloud
Ensuring Software Quality in the cloud
 
Java em containers Docker: Paraíso ou esquecimento?
Java em containers Docker: Paraíso ou esquecimento?Java em containers Docker: Paraíso ou esquecimento?
Java em containers Docker: Paraíso ou esquecimento?
 
Garantindo a qualidade do seu software na nuvem
Garantindo a qualidade do seu software na nuvemGarantindo a qualidade do seu software na nuvem
Garantindo a qualidade do seu software na nuvem
 
Mensageria sob Demanda: Uma introdução ao MaaS (Messaging-as-a-Service)
Mensageria sob Demanda: Uma introdução ao MaaS (Messaging-as-a-Service)Mensageria sob Demanda: Uma introdução ao MaaS (Messaging-as-a-Service)
Mensageria sob Demanda: Uma introdução ao MaaS (Messaging-as-a-Service)
 
Spark nas-nuvens
Spark nas-nuvensSpark nas-nuvens
Spark nas-nuvens
 
Do código ao Sucesso com Source-To-Image
Do código ao Sucesso com Source-To-ImageDo código ao Sucesso com Source-To-Image
Do código ao Sucesso com Source-To-Image
 
Exporando xpaas-8
Exporando xpaas-8Exporando xpaas-8
Exporando xpaas-8
 
Construindo uma-carreira-open-source
Construindo uma-carreira-open-sourceConstruindo uma-carreira-open-source
Construindo uma-carreira-open-source
 
Fedora 24 Release party
Fedora 24 Release partyFedora 24 Release party
Fedora 24 Release party
 
Novas oportunidades para o .net com a parceria microsoft e red hat
Novas oportunidades para o .net com a parceria microsoft e red hatNovas oportunidades para o .net com a parceria microsoft e red hat
Novas oportunidades para o .net com a parceria microsoft e red hat
 
Openshift v3-a-revolucao-dos-containers-3
Openshift v3-a-revolucao-dos-containers-3Openshift v3-a-revolucao-dos-containers-3
Openshift v3-a-revolucao-dos-containers-3
 
Putting a-heat-with-thermostat
Putting a-heat-with-thermostatPutting a-heat-with-thermostat
Putting a-heat-with-thermostat
 
Idaas sso-openshift
Idaas sso-openshiftIdaas sso-openshift
Idaas sso-openshift
 
Migracao gae-openshift
Migracao gae-openshiftMigracao gae-openshift
Migracao gae-openshift
 
Byteman: Tudo o que queria saber mas não sabia a quem perguntar
Byteman: Tudo o que queria saber mas não sabia a quem perguntarByteman: Tudo o que queria saber mas não sabia a quem perguntar
Byteman: Tudo o que queria saber mas não sabia a quem perguntar
 
Boas vindas - JBUG:Brasil
Boas vindas - JBUG:BrasilBoas vindas - JBUG:Brasil
Boas vindas - JBUG:Brasil
 
Sua aplicação nas nuvens com open shift
Sua aplicação nas nuvens com open shiftSua aplicação nas nuvens com open shift
Sua aplicação nas nuvens com open shift
 
De zero a cem em cloud computing transformando idéias em aplicações em pouco...
De zero a cem em cloud computing  transformando idéias em aplicações em pouco...De zero a cem em cloud computing  transformando idéias em aplicações em pouco...
De zero a cem em cloud computing transformando idéias em aplicações em pouco...
 
De zero a cem em cloud computing transformando idéias em aplicações em pouco...
De zero a cem em cloud computing  transformando idéias em aplicações em pouco...De zero a cem em cloud computing  transformando idéias em aplicações em pouco...
De zero a cem em cloud computing transformando idéias em aplicações em pouco...
 
JEE nas nuvens: uma introdução ao openshift
JEE nas nuvens:  uma introdução ao openshiftJEE nas nuvens:  uma introdução ao openshift
JEE nas nuvens: uma introdução ao openshift
 

Último

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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 - 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 Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Último (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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 - 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 Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Jud con presentation_brazil

  • 1.
  • 2. The Developer Swiss Knife: Troubleshooting Tools for Java EE Applications
  • 3. Assumptions •This presentation aims experienced developers with a little (but good) knowledge about how the JVM works •The presentation focus only on the tools, not on the troubleshooting methods •Some of the tools are only for Linux. Windows users, get out! =P •All tools presented in this presentation are Open Source projects and some of them are developed by JBoss
  • 5. The Tools •JDK CLI Tools (jstack, jmap, jps, etc.) •JDK GUI Tools (JVisualVM, JConsole) •Eclipse Memory Analyzer Tool (MAT) •Thermostat •Garbagecat •Samurai •AS7 JDR (JBoss Disaster Report) tool •Tattletale •Byteman*
  • 6. JDK has its own troubleshooting tools ● jps ● jmap ● jinfo ● jhat ● jstack
  • 7. Some of them are Graphical ● JConsole ● JVisualVM
  • 8. What should I do when my application has a memory problem?
  • 9. Generating a Heap Dump ● -XX:-HeapDumpOnOutOfMemoryError ● jmap ● JVisualVM
  • 10. Ok, I have a Heap Dump. Now can I analyze it?
  • 12. What should I do if my application have a CPU problem? e.g. High CPU consumption
  • 13. Generating a Thread Dump ● jstack ● kill -3 ● AS7 CLI command: – /core-service=platform- mbean/type=threading:dump-all-threads(locked- monitors=true,locked-synchronizers=true)
  • 14. Now with a Thread Dump, what should I do with it?
  • 15. Samurai – A Thread Dump viewer
  • 16. High CPU consumption can be high GC activity
  • 17. Enabling GC Logging ● Add to java command: -XX:+PrintGC -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps
  • 18. GC Log content 3.122: [GC 132096K->24592K(504320K), 0.0321910 secs] 4.558: [GC 156688K->26752K(504320K), 0.0340520 secs] 6.609: [GC 158848K->50117K(504320K), 0.0628430 secs] 7.077: [GC 80334K->54921K(504320K), 0.0416730 secs] 7.119: [Full GC 54921K->46716K(504320K), 0.2522170 secs] 8.510: [GC 178812K->60924K(504320K), 0.0190690 secs] 9.683: [GC 193020K->69447K(461696K), 0.0308020 secs]
  • 19. Garbagecat java -jar garbagecat-1.0.0.jar --help usage: garbagecat [OPTION]... [FILE] -h,--help help -o,--options <arg> JVM options used during JVM run -p,--preprocess preprocessing flag -s,--startdatetime <arg> JVM start datetime (yyyy-MM-dd HH:mm:ss,SSS) for converting GC logging timestamps to datetime -t,--threshold <arg> threshold (0-100) for throughput bottleneck reporting
  • 20. Garbagecat report ======================================== Throughput less than 90% for PARALLEL_SCAVENGE ======================================== 18020.492: [GC [PSYoungGen: 161888K->1376K(166016K)] 949359K->789159K(1214592K), 0.0294550 secs] ... ======================================== SUMMARY: ======================================== # GC Events: 46044 GC Event Types: PARALLEL_SCAVENGE, PARALLEL_SERIAL_OLD Max Heap Space: 1566912K Max Heap Occupancy: 1562164K Max Perm Space: 77864K Max Perm Occupancy: 46645K Throughput: 99% Max Pause: 4098 ms Total Pause: 1703657 ms First Timestamp: 4616 ms Last Timestamp: 232465068 ms ======================================== 0 UNIDENTIFIED LOG LINE(S):
  • 21. Applications also might have classloading problems
  • 24. Wait a minute! I tried to run jvisualvm in OpenJDK and it says “command not found”
  • 25. Thermostat – The next heat
  • 26. Please Remember ● Don't develop applications without make use of testing approaches (unit, integration, functional, ...) ● Although all testing efforts, there is no 100% bug free applications ● For all unpredictable and complex problems, this presentation will help you troubleshoot, if not all, most of the problem
  • 27. The links ● http://icedtea.classpath.org/wiki/Thermostat ● http://eclipse.org/mat/ ● http://yusuke.homeip.net/samurai/en/index.html ● https://code.google.com/a/eclipselabs.org/p/garbagecat/ ● http://docs.oracle.com/javase/7/docs/index.html ● http://www.jboss.org/tattletale ● http://jboss.org/byteman Twitter: @rimolive http://aprendendo-cloud-computing.blogspot.com
  • 30. Race Condition Tests with Byteman Flávia Rainone Don't miss it!