13.07.2015 Views

Application Deployment Guide - GlassFish - Java

Application Deployment Guide - GlassFish - Java

Application Deployment Guide - GlassFish - Java

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Profiling Toolshttp://java.sun.com/developer/technicalArticles/Programming/HPROF.html.After HPROF is enabled using the following instructions, its libraries are loaded intothe server process.To Use HPROF Profiling on UNIX1. Use the Administration Console. Select the JVM Settings component under therelevant configuration. Then select the Profiler tab.2. Edit the following fields:■■■■■Profiler Name - hprofProfiler Enabled - trueClasspath - (leave blank)Native Library Path - (leave blank)JVM Option - Select Add, type the HPROF JVM option in the Value field, thencheck its box. The syntax of the HPROF JVM option is as follows:-Xrunhprof[:help]|[:param=value,param2=value2, ...]Here is an example of params you can use:-Xrunhprof:file=log.txt,thread=y,depth=3The file parameter determines where the stack dump is written.Using help lists parameters that can be passed to HPROF. The output is asfollows:Hprof usage: -Xrunhprof[:help]|[:=, ...]Option Name and Value Description Default--------------------- ----------- -------heap=dump|sites|all heap profiling allcpu=samples|old CPU usage offformat=a|bascii or binary output afile= write data to file java.hprof(.txt for ascii)net=: send data over a socket write to filedepth= stack trace depth 4cutoff= output cutoff point 0.0001lineno=y|nline number in traces? ythread=y|n thread in traces? ndoe=y|n dump on exit? yNote: Do not use help in the JVM Option field. This parameterprints text to the standard output and then exits.The help output refers to the parameters as options, but they arenot the same thing as JVM options.3. Restart the <strong>GlassFish</strong> Server.This writes an HPROF stack dump to the file you specified using the file HPROFparameter.Debugging <strong>Application</strong>s 3-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!