Java Troubleshooting Guide for HP-UX Systems

Table of Contents
About This Guide...............................................................................................................9
Intended Audience.................................................................................................................................9
Publishing History..................................................................................................................................9
Locating This Guide................................................................................................................................9
Guide Organization................................................................................................................................9
Typographic Conventions.....................................................................................................................10
Related Information..............................................................................................................................11
HP Encourages Your Comments..........................................................................................................11
1 Diagnostic and Monitoring Tools and Options........................................................13
1.1 HP-UX Java Tools and Options Tables............................................................................................13
1.1.1 Crash Analysis Tools...............................................................................................................13
1.1.2 Hung or Deadlocked Processes...............................................................................................13
1.1.3 Fatal Error Handling...............................................................................................................14
1.1.4 Memory Usage Monitoring Tools...........................................................................................14
1.1.5 Performance Tools...................................................................................................................15
1.1.6 Miscellaneous Tools and Options...........................................................................................16
1.1.7 JDK Tools Not Available on HP-UX........................................................................................16
1.2 Ctrl-Break Handler..........................................................................................................................17
1.3 Fatal Error Log (hs_err_pid<pid>.log)...................................................................................18
1.4 gcore..............................................................................................................................................18
1.5 gdb...................................................................................................................................................19
1.5.1 Java Stack Unwind Features....................................................................................................20
1.5.2 gdb Subcommands for Java VM Debugging..........................................................................20
1.6 HPjconfig.....................................................................................................................................22
1.7 HPjmeter........................................................................................................................................25
1.7.1 Static Data Analysis.................................................................................................................27
1.7.1.1 Using HPjmeter to Analyze Profiling Data...................................................................27
1.7.1.2 Using HPjmeter to Analyze Garbage Collection Data..................................................29
1.7.2 Dynamic Data Analysis...........................................................................................................29
1.7.2.1 Using HPjmeter to Monitor Applications.....................................................................29
1.7.2.2 Connecting to the Node Agent From the HPjmeter Console.......................................31
1.7.2.3 Setting Session Preferences.............................................................................................31
1.7.2.4 Viewing Monitoring Metrics During Your Open Session...............................................33
1.7.2.5 Running the HPjmeter Sample Programs.....................................................................33
1.7.2.5.1 Sample Memory Leak Application.........................................................................34
1.7.2.5.2 Sample Thread Deadlock Application....................................................................35
1.8 HPjtune..........................................................................................................................................36
1.9 hat...................................................................................................................................................36
1.10 hprof............................................................................................................................................37
1.11 java.security.debug System Property..................................................................................37
1.12 JAVA_TOOL_OPTIONS Environment Variable.............................................................................38
1.13 jconsole (1.5+ only)....................................................................................................................38
1.14 jdb.................................................................................................................................................39
1.15 jhat...............................................................................................................................................39
1.16 jps (1.5+ only)...............................................................................................................................40
1.17 jstat (1.5+ only)..........................................................................................................................40
1.18 jstatd (1.5+ only)........................................................................................................................42
1.19 jvmstat Tools..................................................................................................................................42
1.20 -verbose:class.........................................................................................................................42
Table of Contents 3