How to use HPROF on Websphere 7.0?

Document ID : KB000014179
Last Modified Date : 14/02/2018
Show Technical Document Details

How to use HPROF on Websphere 7.0?

APM 10.x

HPROF is a heap/CPU profiling tool. This is useful in gathering information to troubleshoot the application when there is a high CPU/memory usage.

Here is how to use hprof on WAS 7.0:

  1. Open and sign on to the WebSphere admin console.
  2. In the left pane, select Servers > Server Types > WebSphere application servers.
  3. Click on the link for the specific server.
  4. Expand Java and Process Management.
  5. Click on the Process Definition link.
  6. Click on the Servant link.
  7. Click on the Java Virtual Machine link.
  8. Select the Run HProf check box.
  9. In the HProf Arguments field, enter <options>,file=<file-name>.
  10. Click the OK button.
  11. Click the Save link at the top of the page.
  12. Recycle or start the application server.
  13. Perform the tasks that you want to measure.
  14. Recycle or stop the application server.

The hprof thread writes its results in the file specified in step 9. Note that the file must be writable, and that hprof will write it only when the JVM stops.


Additional Information:


The steps are very similar for Websphere 8.x also. In WAS 8.x, instead of clicking in Servant Link (Step 6), you can directly go to Step 7 from Step 5.