Jud con presentation_brazil
Upcoming SlideShare
Loading in...5
×
 

Jud con presentation_brazil

on

  • 590 views

 

Statistics

Views

Total Views
590
Views on SlideShare
466
Embed Views
124

Actions

Likes
0
Downloads
3
Comments
0

5 Embeds 124

http://aprendendo-cloud-computing.blogspot.com.br 113
http://aprendendo-cloud-computing.blogspot.com 7
http://aprendendo-cloud-computing.blogspot.jp 2
http://aprendendo-cloud-computing.blogspot.ch 1
https://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Jud con presentation_brazil Jud con presentation_brazil Presentation Transcript

  • The Developer Swiss Knife: TroubleshootingTools for Java EE Applications
  • Assumptions•This presentation aims experienced developerswith a little (but good) knowledge about how theJVM works•The presentation focus only on the tools, not onthe troubleshooting methods•Some of the tools are only for Linux. Windowsusers, get out! =P•All tools presented in this presentation are OpenSource projects and some of them aredeveloped by JBoss
  • The Application stackOur 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 amemory 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 CPUproblem? 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 withit?
  • 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 content3.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]
  • Garbagecatjava -jar garbagecat-1.0.0.jar --helpusage: 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 bottleneckreporting
  • 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: 46044GC Event Types: PARALLEL_SCAVENGE, PARALLEL_SERIAL_OLDMax Heap Space: 1566912KMax Heap Occupancy: 1562164KMax Perm Space: 77864KMax Perm Occupancy: 46645KThroughput: 99%Max Pause: 4098 msTotal Pause: 1703657 msFirst Timestamp: 4616 msLast Timestamp: 232465068 ms========================================0 UNIDENTIFIED LOG LINE(S):
  • Applications also might have classloadingproblems
  • Tattletale
  • JBoss AS7 has JDR
  • Wait a minute! I tried to run jvisualvm in OpenJDKand it says “command not found”
  • Thermostat – The next heat
  • Please Remember● Dont develop applications without make useof 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, ifnot 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/bytemanTwitter: @rimolivehttp://aprendendo-cloud-computing.blogspot.com
  • Thank you!
  • What about Byteman?
  • Race Condition Tests with BytemanFlávia RainoneDont miss it!