How can we get a thread dump of running java process

First find out java processes:

# jps
19420 MyServer
19843 Jps
8259 Bootstrap

Then using that process id, run jstack to get a thread dump:

# jstack 19420

NOTE: jps and jstack are JDK tools.

Another way to get a thread dump would be to use:

# kill -3 19420

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: