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

We encountered the problem of 100% processor utilization after the server has been running for 20-30 minutes. We are trying to troubleshoot.

I read what we can use jstackto dump a high cpu stream.

However, Amazon ami does not have jstack installed.

OpenJDK Runtime Environment (amzn-2.5.1.2.45.amzn1-x86_64 u65-b17)

Is there a way to install jstack without reinstalling the oracle assembly? Also, is there any other solution for getting a dump?

+4
source share
1 answer

Try the following command:

kill -quit <java process id>

Stack threads should be added to the default output. More information here.

+1

All Articles