Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Java™ Troubleshooting Guide for HP-UX Systems: > Chapter 1 Diagnostic and Monitoring Tools and Options

HP-UX Java Tools and Options Tables

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The tools and options are categorized into the following table groupings:

Crash Analysis Tools

Several of the options and tools described in this chapter are designed for postmortem diagnostics. These are the options and tools that can be used to obtain additional information if an application crashes. This analysis may either be done at the time of the crash or at a later time using information from the core file. In addition to these tools, many other tools have features useful for crash analysis.

Table 1-1 Tools and Options for Crash Analysis

Tool or OptionDescription and Usage
wdb /gdbAn HP-supported implementation of the gdb debugger that has Java support. For simplicity, this document refers to wdb/gdb as gdb from this point forward. gdb can be used to attach to a running process.
Fatal Error Log (hs_err_pid<pid>.log)Contains information obtained at the time of the crash. Often one of the first pieces of data to examine when a crash occurs.
-XX:ErrorFileSpecify filename to use for the fatal error log.
-XX:OnErrorSpecify a sequence of user-supplied scripts or commands to be executed when a crash occurs.
-XX:+ShowMessageBoxOnErrorSuspend the process when a crash occurs. Depending on the user response, it can launch the gdb debugger to attach to the Java VM.
jdb Java language debugger.

 

Hung or Deadlocked Processes

The following options and tools can help you debug a hung or deadlocked process:

Table 1-2 Tools and Options for Debugging Hung or Deadlocked Processes

Tool or OptionDescription and Usage
wdb/gdbAn HP-supported implementation of the gdb debugger that has Java support. For simplicity, this document refers to wdb/gdb as gdb from this point forward. gdb can be used to attach to a running process.
HPjmeterUsed to identify and diagnose performance problems in Java applications running on HP-UX. It can also be used to debug thread and heap issues.
Ctrl-Break HandlerUsed to retrieve thread dump information. It also executes a deadlock detection algorithm and reports any deadlocks detected involving synchronized code. Heap dumps are also generated beginning with JDK 1.5.0.05 and SDK 1.4.2.11 when the -XX:+HeapDumpOnCtrlBreak option is specified.
gcore (11i v3 (11.31) only)Creates a core image of a running process.
jdbJava language debugger.

 

Fatal Error Handling

The following options are useful for retrieving more information when fatal errors occur:

Table 1-3 Options for Fatal Error Handling

OptionDescription and Usage
-XX:OnErrorUsed to specify a sequence of user-supplied scripts or commands to be executed when a crash occurs.
-XX:+ShowMessageBoxOnErrorUsed to suspend the process when a crash occurs. After the process is suspended, the user can use gdb to attach to the Java VM.
-XX:+HeapDumpOnOutOfMemoryError, starting with SDK 1.4.2.11 and JDK 1.5.0.04Enables dumping of the heap when an out of memory error condition occurs in the Java VM.

 

Memory Usage Monitoring Tools

The following options and tools are useful for monitoring memory usage of running applications:

Table 1-4 Tools and Options for Monitoring Memory Usage

ToolDescription and Usage
HPjmeterUsed to identify and diagnose performance problems in Java applications by examining and monitoring the heap and threads.
HPjtuneHPjtune functionality has been integrated into HPjmeter
-XX:+HeapDump and _JAVA_HEAPDUMP Environment Variable, starting with JDK 1.5.0.03 and SDK 1.4.2.10Used to observe memory allocation in a running Java application by taking snapshots of the heap over time. It can be set by providing the -XX:+HeapDump option or setting the _JAVA_HEAPDUMP environment variable.
-XX:+HeapDumpOnCtrlBreak , starting with JDK 1.5.0.05 and SDK 1.4.2.11Enables the ability to take snapshots of the Java heap when a SIGQUIT signal is sent to the Java process without using the JVMTI-based -Xrunhprof:heap=dump option.
-XX:+HeapDumpOnOutOfMemoryError, starting with JDK 1.5.0.04 and SDK 1.4.2.11Enables dumping of the Java heap when an “Out Of Memory” error condition occurs in the Java VM.
-XX:+HeapDumpOnly, starting with JDK 1.5.0.05 and SDK 1.4.2.11Used to enable heap dumps using the SIGVTALRM signal (signal 20). It can be set by providing the -XX:+HeapDumpOnly option or setting the _JAVA_HEAPDUMP_ONLY environment variable. This interface is provided to separate the generation of thread and trace information triggered via SIGQUIT from the heap dump information.
-Xverbosegc (HP only) and -verbose:gcUsed to enable logging of garbage collection information. The HP-only -Xverbosegc option generates additional GC information that is used by HPjtune. It is preferable to use -Xverbosegc instead of -verbose:gc.
hat or jhatThis third-party tool may be used to perform Java heap analysis.
jconsole (1.5+ only)Used to monitor and manage an application launched with a management agent on a local or remote machine.
“Allocation Site Statistics and Zero Preparation Xverbosegc”Prompts the Java Virtual Machine (JVM) to emit HP Xverbosegc information and allocation site statistics for Java applications.

 

Performance Tools

The following tools are useful for identifying where the application spends its time. Some tools enable you to monitor performance in real time (dynamic analysis) and other tools enable you to analyze captured profiling data (static analysis):

Table 1-5 Performance Tools

ToolDescription and Usage
GlancePlusEasily examine system activities, identify and resolve performance bottlenecks, and tune your system for more efficient operation.
HP CaliperUnderstand the execution of your applications and identify ways to improve their performance.
HPjmeterUse statically collected eprof data to understand where the application is spending time. Use dynamic real-time monitoring to identify performance issues.
HPjtuneHPjtune functionality has been integrated into HPjmeter
hprofSimple static profiler agent used for heap and CPU profiling.
iostatIteratively reports I/O statistics for each active disk on the system.
jstat (1.5+ only)Attaches to the Java VM and collects and logs performance statistics dynamically.
jconsole (1.5+ only)Launches a simple console tool enabling you to dynamically monitor and manage an application launched with a management agent on a local or remote machine.
ProspectRetrieve a profile of the compiled Java methods that the Java VM compiler creates in data space.
netstatDisplays statistics for network interfaces and protocols as well as the contents of various network-related data structures. It can show packet traffic, connections, error rates, and more.
sarReport various system activities, such as processor, I/O, context switches, interrupts, page faults, and other kernel actions.
swapinfoDisplays information about device and file-system-paging space.
topDisplays the top processes on the system, periodically updating the information; raw processor percentage is used to rank the processes.
tuscProvides another view into the system activity, in addition to Java stack traces, GlancePlus, and HPjmeter.
vmstatReports statistics about the process, virtual memory, trap, and processor activity.

 

Miscellaneous Tools and Options

The following tools and options do not fall into any of the previous categories:

Table 1-6 Miscellaneous Tools and Options

Tool or OptionDescription and Usage
JAVA_TOOL_OPTIONS Environment VariableUsed to augment the options specified in the Java command line.
jvmstat ToolsTools include jps, jstat, and jstatd. These tools are included with JDK 1.5+.
visualgcUses jvmstat technology to provide visualization of garbage collection activity in the Java VM.
-verbose:classEnables logging of class loading and unloading.
-verbose:jniEnables logging of JNI (Java Native Interface).
-Xcheck:jni Performs additional validation on the arguments passed to JNI functions.

 

JDK Tools Not Available on HP-UX

Some JDK tools are not available on HP-UX, so they are not described in this document. They are provided in JavaSoft JDK as unsupported tools. Equivalent functionality is available via gdb Java support, HPjmeter, and the HeapDump options.

Table 1-7 JDK Tools Not Available on HP-UX

ToolDescription and HP-UX Alternative
jinfoPrints Java configuration information for a given Java process, core file, or remote debug server.
jmapPrints shared object memory maps or Java heap memory details of a given process, core file, or remote debug server. Use the HeapDump options or gdb heap dump functionality instead.
jstackPrints a Java stack trace of Java threads for a given Java process, core file, or remote debug server. Use gdb stack trace back functionality instead.
Serviceability Agent (SA)Not supported on HP-UX.

 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2009 Hewlett-Packard Development Company, L.P.