Profiling WebSphere with hprof for CPU SAMPLES output
up vote
1
down vote
favorite
I'm trying to profile WebSphere using hprof over IBM stack (J9 JVM on AIX / Linux). Specifically, I'm interested in the CPU samples output from hprof, and particularly, the startup time (from the time WS is started until it is "ready for business").
The problem is, I can't get the CPU samples output in the hprof result file.
I'm using the following JVM argument for configuring hprof: -Xrunhprof:cpu=samples,file=path-to-hprof.txt
, for dumping hprof output in ASCII format. According to the generated hprof output, the CPU SAMPLES
output is only generated at program exit:
HEAP DUMP, SITES, CPU SAMPLES|TIME and MONITOR DUMP|TIME records are generated
at program exit.
So, for shutting down WebSphere gracefully after it successfully started, I'm using the stopServer.sh
script, and expecting the CPU SAMPLES output to be present in the result java.hprof.txt
file after shutdown completes, but it isn't.
What am I doing wrong? Is there a better method for using hprof with WebSphere and generating CPU profiling output? Any help will be much appreciated!
Edit: I'm running WebSphere version 8.0.0.11 over IBM J9 VM (build 2.6, JRE 1.6.0 20150619_253846) on RHEL 7.5.
P.S.: I also looked for a way for closing WS from the management console GUI, but couldn't find any.
P.P.S.: In the meanwhile I'm using the very nice jvmtop tool with the --profile <pid>
option, but that provides only partial insight, and as opposed to hprof, has to be attached on the fly, so some parts of the execution are lost.
java jvm websphere hprof j9
|
show 7 more comments
up vote
1
down vote
favorite
I'm trying to profile WebSphere using hprof over IBM stack (J9 JVM on AIX / Linux). Specifically, I'm interested in the CPU samples output from hprof, and particularly, the startup time (from the time WS is started until it is "ready for business").
The problem is, I can't get the CPU samples output in the hprof result file.
I'm using the following JVM argument for configuring hprof: -Xrunhprof:cpu=samples,file=path-to-hprof.txt
, for dumping hprof output in ASCII format. According to the generated hprof output, the CPU SAMPLES
output is only generated at program exit:
HEAP DUMP, SITES, CPU SAMPLES|TIME and MONITOR DUMP|TIME records are generated
at program exit.
So, for shutting down WebSphere gracefully after it successfully started, I'm using the stopServer.sh
script, and expecting the CPU SAMPLES output to be present in the result java.hprof.txt
file after shutdown completes, but it isn't.
What am I doing wrong? Is there a better method for using hprof with WebSphere and generating CPU profiling output? Any help will be much appreciated!
Edit: I'm running WebSphere version 8.0.0.11 over IBM J9 VM (build 2.6, JRE 1.6.0 20150619_253846) on RHEL 7.5.
P.S.: I also looked for a way for closing WS from the management console GUI, but couldn't find any.
P.P.S.: In the meanwhile I'm using the very nice jvmtop tool with the --profile <pid>
option, but that provides only partial insight, and as opposed to hprof, has to be attached on the fly, so some parts of the execution are lost.
java jvm websphere hprof j9
Can you check if there's anything in native_stderr.log and native_stdout.log?
– kgibm
Nov 12 at 15:47
Also, for J9, I recommend the sampling profiler Health Center that ships with IBM Java instead of HPROF: publib.boulder.ibm.com/httpserv/cookbook/…
– kgibm
Nov 12 at 15:48
Thanks for your comments, @kgibm! Nothing that pops up in native_stderr.log and native_stdout.log but the standard WS outputs.
– valiano
Nov 12 at 15:51
Note, I'm primarily interested in a console profiler - perhaps I should have highlighted that in my question. But surely I'll give a closer look on the IBM health center sampling profiler.
– valiano
Nov 12 at 15:54
1
Roger that, @kgibm... Thank you very much for your kind help!
– valiano
Nov 12 at 20:43
|
show 7 more comments
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to profile WebSphere using hprof over IBM stack (J9 JVM on AIX / Linux). Specifically, I'm interested in the CPU samples output from hprof, and particularly, the startup time (from the time WS is started until it is "ready for business").
The problem is, I can't get the CPU samples output in the hprof result file.
I'm using the following JVM argument for configuring hprof: -Xrunhprof:cpu=samples,file=path-to-hprof.txt
, for dumping hprof output in ASCII format. According to the generated hprof output, the CPU SAMPLES
output is only generated at program exit:
HEAP DUMP, SITES, CPU SAMPLES|TIME and MONITOR DUMP|TIME records are generated
at program exit.
So, for shutting down WebSphere gracefully after it successfully started, I'm using the stopServer.sh
script, and expecting the CPU SAMPLES output to be present in the result java.hprof.txt
file after shutdown completes, but it isn't.
What am I doing wrong? Is there a better method for using hprof with WebSphere and generating CPU profiling output? Any help will be much appreciated!
Edit: I'm running WebSphere version 8.0.0.11 over IBM J9 VM (build 2.6, JRE 1.6.0 20150619_253846) on RHEL 7.5.
P.S.: I also looked for a way for closing WS from the management console GUI, but couldn't find any.
P.P.S.: In the meanwhile I'm using the very nice jvmtop tool with the --profile <pid>
option, but that provides only partial insight, and as opposed to hprof, has to be attached on the fly, so some parts of the execution are lost.
java jvm websphere hprof j9
I'm trying to profile WebSphere using hprof over IBM stack (J9 JVM on AIX / Linux). Specifically, I'm interested in the CPU samples output from hprof, and particularly, the startup time (from the time WS is started until it is "ready for business").
The problem is, I can't get the CPU samples output in the hprof result file.
I'm using the following JVM argument for configuring hprof: -Xrunhprof:cpu=samples,file=path-to-hprof.txt
, for dumping hprof output in ASCII format. According to the generated hprof output, the CPU SAMPLES
output is only generated at program exit:
HEAP DUMP, SITES, CPU SAMPLES|TIME and MONITOR DUMP|TIME records are generated
at program exit.
So, for shutting down WebSphere gracefully after it successfully started, I'm using the stopServer.sh
script, and expecting the CPU SAMPLES output to be present in the result java.hprof.txt
file after shutdown completes, but it isn't.
What am I doing wrong? Is there a better method for using hprof with WebSphere and generating CPU profiling output? Any help will be much appreciated!
Edit: I'm running WebSphere version 8.0.0.11 over IBM J9 VM (build 2.6, JRE 1.6.0 20150619_253846) on RHEL 7.5.
P.S.: I also looked for a way for closing WS from the management console GUI, but couldn't find any.
P.P.S.: In the meanwhile I'm using the very nice jvmtop tool with the --profile <pid>
option, but that provides only partial insight, and as opposed to hprof, has to be attached on the fly, so some parts of the execution are lost.
java jvm websphere hprof j9
java jvm websphere hprof j9
edited Nov 13 at 13:50
asked Nov 11 at 11:46
valiano
2,92021130
2,92021130
Can you check if there's anything in native_stderr.log and native_stdout.log?
– kgibm
Nov 12 at 15:47
Also, for J9, I recommend the sampling profiler Health Center that ships with IBM Java instead of HPROF: publib.boulder.ibm.com/httpserv/cookbook/…
– kgibm
Nov 12 at 15:48
Thanks for your comments, @kgibm! Nothing that pops up in native_stderr.log and native_stdout.log but the standard WS outputs.
– valiano
Nov 12 at 15:51
Note, I'm primarily interested in a console profiler - perhaps I should have highlighted that in my question. But surely I'll give a closer look on the IBM health center sampling profiler.
– valiano
Nov 12 at 15:54
1
Roger that, @kgibm... Thank you very much for your kind help!
– valiano
Nov 12 at 20:43
|
show 7 more comments
Can you check if there's anything in native_stderr.log and native_stdout.log?
– kgibm
Nov 12 at 15:47
Also, for J9, I recommend the sampling profiler Health Center that ships with IBM Java instead of HPROF: publib.boulder.ibm.com/httpserv/cookbook/…
– kgibm
Nov 12 at 15:48
Thanks for your comments, @kgibm! Nothing that pops up in native_stderr.log and native_stdout.log but the standard WS outputs.
– valiano
Nov 12 at 15:51
Note, I'm primarily interested in a console profiler - perhaps I should have highlighted that in my question. But surely I'll give a closer look on the IBM health center sampling profiler.
– valiano
Nov 12 at 15:54
1
Roger that, @kgibm... Thank you very much for your kind help!
– valiano
Nov 12 at 20:43
Can you check if there's anything in native_stderr.log and native_stdout.log?
– kgibm
Nov 12 at 15:47
Can you check if there's anything in native_stderr.log and native_stdout.log?
– kgibm
Nov 12 at 15:47
Also, for J9, I recommend the sampling profiler Health Center that ships with IBM Java instead of HPROF: publib.boulder.ibm.com/httpserv/cookbook/…
– kgibm
Nov 12 at 15:48
Also, for J9, I recommend the sampling profiler Health Center that ships with IBM Java instead of HPROF: publib.boulder.ibm.com/httpserv/cookbook/…
– kgibm
Nov 12 at 15:48
Thanks for your comments, @kgibm! Nothing that pops up in native_stderr.log and native_stdout.log but the standard WS outputs.
– valiano
Nov 12 at 15:51
Thanks for your comments, @kgibm! Nothing that pops up in native_stderr.log and native_stdout.log but the standard WS outputs.
– valiano
Nov 12 at 15:51
Note, I'm primarily interested in a console profiler - perhaps I should have highlighted that in my question. But surely I'll give a closer look on the IBM health center sampling profiler.
– valiano
Nov 12 at 15:54
Note, I'm primarily interested in a console profiler - perhaps I should have highlighted that in my question. But surely I'll give a closer look on the IBM health center sampling profiler.
– valiano
Nov 12 at 15:54
1
1
Roger that, @kgibm... Thank you very much for your kind help!
– valiano
Nov 12 at 20:43
Roger that, @kgibm... Thank you very much for your kind help!
– valiano
Nov 12 at 20:43
|
show 7 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Thanks to @kgibm's helpful hints, I realized I was on the right track, and went back the next day to try again. Surprisingly, this time, it worked! The hprof file was generated with the expected WebSphere CPU samples output.
I kept experimenting to figure out what I got wrong in the first place. Here's what I think has happened:
At first, I had a couple of native agents specified in WebSphere JVM arguments. The combination of these agents caused WS to run much slower. When I killed WS, there were a few seconds between the
Server server1 stop completed
message was printed andhprof.txt
being completely written. I believe I was too quick to viewhprof.txt
, before the CPU samples output was actually written.Then, for troubleshooting this issue, I added the
doe=n
parameter to the hprof argument.doe
stands for Dump On Exit, and defaults toy
. Only later I realized that this is probably wrong, since as quoted, CPU samples output is only generated at exit.
I think that these two issues together contributed to my confusion, so when I started clean, everything was OK.
Perhaps it is worth clarifying in hprof documentation that the doe=n
option is conflicting with cpu=samples
, and possibly with the other options that write on exit as well (I didn't see such an indication in the docs, but it's possible I've missed it).
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Thanks to @kgibm's helpful hints, I realized I was on the right track, and went back the next day to try again. Surprisingly, this time, it worked! The hprof file was generated with the expected WebSphere CPU samples output.
I kept experimenting to figure out what I got wrong in the first place. Here's what I think has happened:
At first, I had a couple of native agents specified in WebSphere JVM arguments. The combination of these agents caused WS to run much slower. When I killed WS, there were a few seconds between the
Server server1 stop completed
message was printed andhprof.txt
being completely written. I believe I was too quick to viewhprof.txt
, before the CPU samples output was actually written.Then, for troubleshooting this issue, I added the
doe=n
parameter to the hprof argument.doe
stands for Dump On Exit, and defaults toy
. Only later I realized that this is probably wrong, since as quoted, CPU samples output is only generated at exit.
I think that these two issues together contributed to my confusion, so when I started clean, everything was OK.
Perhaps it is worth clarifying in hprof documentation that the doe=n
option is conflicting with cpu=samples
, and possibly with the other options that write on exit as well (I didn't see such an indication in the docs, but it's possible I've missed it).
add a comment |
up vote
0
down vote
accepted
Thanks to @kgibm's helpful hints, I realized I was on the right track, and went back the next day to try again. Surprisingly, this time, it worked! The hprof file was generated with the expected WebSphere CPU samples output.
I kept experimenting to figure out what I got wrong in the first place. Here's what I think has happened:
At first, I had a couple of native agents specified in WebSphere JVM arguments. The combination of these agents caused WS to run much slower. When I killed WS, there were a few seconds between the
Server server1 stop completed
message was printed andhprof.txt
being completely written. I believe I was too quick to viewhprof.txt
, before the CPU samples output was actually written.Then, for troubleshooting this issue, I added the
doe=n
parameter to the hprof argument.doe
stands for Dump On Exit, and defaults toy
. Only later I realized that this is probably wrong, since as quoted, CPU samples output is only generated at exit.
I think that these two issues together contributed to my confusion, so when I started clean, everything was OK.
Perhaps it is worth clarifying in hprof documentation that the doe=n
option is conflicting with cpu=samples
, and possibly with the other options that write on exit as well (I didn't see such an indication in the docs, but it's possible I've missed it).
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Thanks to @kgibm's helpful hints, I realized I was on the right track, and went back the next day to try again. Surprisingly, this time, it worked! The hprof file was generated with the expected WebSphere CPU samples output.
I kept experimenting to figure out what I got wrong in the first place. Here's what I think has happened:
At first, I had a couple of native agents specified in WebSphere JVM arguments. The combination of these agents caused WS to run much slower. When I killed WS, there were a few seconds between the
Server server1 stop completed
message was printed andhprof.txt
being completely written. I believe I was too quick to viewhprof.txt
, before the CPU samples output was actually written.Then, for troubleshooting this issue, I added the
doe=n
parameter to the hprof argument.doe
stands for Dump On Exit, and defaults toy
. Only later I realized that this is probably wrong, since as quoted, CPU samples output is only generated at exit.
I think that these two issues together contributed to my confusion, so when I started clean, everything was OK.
Perhaps it is worth clarifying in hprof documentation that the doe=n
option is conflicting with cpu=samples
, and possibly with the other options that write on exit as well (I didn't see such an indication in the docs, but it's possible I've missed it).
Thanks to @kgibm's helpful hints, I realized I was on the right track, and went back the next day to try again. Surprisingly, this time, it worked! The hprof file was generated with the expected WebSphere CPU samples output.
I kept experimenting to figure out what I got wrong in the first place. Here's what I think has happened:
At first, I had a couple of native agents specified in WebSphere JVM arguments. The combination of these agents caused WS to run much slower. When I killed WS, there were a few seconds between the
Server server1 stop completed
message was printed andhprof.txt
being completely written. I believe I was too quick to viewhprof.txt
, before the CPU samples output was actually written.Then, for troubleshooting this issue, I added the
doe=n
parameter to the hprof argument.doe
stands for Dump On Exit, and defaults toy
. Only later I realized that this is probably wrong, since as quoted, CPU samples output is only generated at exit.
I think that these two issues together contributed to my confusion, so when I started clean, everything was OK.
Perhaps it is worth clarifying in hprof documentation that the doe=n
option is conflicting with cpu=samples
, and possibly with the other options that write on exit as well (I didn't see such an indication in the docs, but it's possible I've missed it).
answered Nov 17 at 20:45
valiano
2,92021130
2,92021130
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248429%2fprofiling-websphere-with-hprof-for-cpu-samples-output%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you check if there's anything in native_stderr.log and native_stdout.log?
– kgibm
Nov 12 at 15:47
Also, for J9, I recommend the sampling profiler Health Center that ships with IBM Java instead of HPROF: publib.boulder.ibm.com/httpserv/cookbook/…
– kgibm
Nov 12 at 15:48
Thanks for your comments, @kgibm! Nothing that pops up in native_stderr.log and native_stdout.log but the standard WS outputs.
– valiano
Nov 12 at 15:51
Note, I'm primarily interested in a console profiler - perhaps I should have highlighted that in my question. But surely I'll give a closer look on the IBM health center sampling profiler.
– valiano
Nov 12 at 15:54
1
Roger that, @kgibm... Thank you very much for your kind help!
– valiano
Nov 12 at 20:43