• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hprof in weblogic 8?

 
Brendon Woodford
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody ,
I have been using hprof for short example programs and found it quite handy.
Can anyone tell me how to run hprof in weblogic 8 server and profile my web application?
Thanks in advance.

Brendon
 
Pierre-Hugues Charbonneau
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brendon,

It depends of which Sun JVM 1.4 version you are using at runtime with your Weblogic 8.1 server.

HeapDump generation following an OutOfMemoryError (hprof format) was first added in JDK 1.4.2_12 and can be enabled by adding -XX:+HeapDumpOnOutOfMemoryError in your JVM start-up arguments.

Regards,
P-H
 
Brendon Woodford
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pierre-Hugues ,

But how is this startup argument added in weblogic8?

I am using myeclipse IDE is there a way to add that in the IDE?

Thanks
Brendon
 
Pierre-Hugues Charbonneau
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Brendon,

If you start Weblogic8.1 from MyEclipse then you will need to locate the section when you can add/modify JVM startup arguments.
-XX:+HeapDumpOnOutOfMemoryError should be added before or after the memory arguments such as Xms & Xmx.

If you cant figure out in Eclipse then you can still edit the Weblogic commEnv.cmd script from your Weblogic 8.1 binary installation and add the parameter from there.

This script file is located under:

<WL8 HOME>/weblogic81/common/bin/commEnv.cmd (for Windows)
<WL8 HOME>/weblogic81/common/bin/commEnv.sh (for UNIX)
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also try visualvm if you haven't tried it yet. Lots of great information in there to look at a running java app.
 
Klament J. Kruoghst
Ranch Hand
Posts: 37
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This script file is located under:

<WL8 HOME>/weblogic81/common/bin/commEnv.cmd (for Windows)
<WL8 HOME>/weblogic81/common/bin/commEnv.sh (for UNIX)


I added -Xprof to the arg list in that file and restarted the server.
I log into the application and play around but I do not see any output in the console coming out.... ? what am I missing.

Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic