Saturday, 23 April 2016

How to take the Thread dump ?


2 simple steps :

1. On xNIX / Mac, use command to get PID of running Java process :

    ps -el | grep java

   On Windows, open Task manager and find the PID

2. Print Thread stacks using jstack
    jstack [PID]

    jstack [PID] > abc.log

No comments:

Post a Comment

Note: only a member of this blog may post a comment.