How to get Java thread dump in EC2 Amazon : No jstack found

Question:

We are experience 100% CPU usage issue after the server runs for 20-30mins. We are trying to troubleshoot.

I have read that we can use jstack to generate dump of high cpu thread.

However in Amazon ami jstack is not installed.

Is there a way I can install jstack without reinstalling oracle build?
Also is there any other solution to get dump?

Answer:

Try following command:

The threads stackthreadses should be appended to default output.
More information available here

Leave a Reply