About Me

My photo
Working as Technical Lead in CollabNET software private limited.

Tuesday, 26 October 2010

"Lockness" eclipse thread dump analysis plugin

There is a eclipse plugin "Lockness" for thread dump analysis (http://lockness.plugin.free.fr/setup.php). Using this we can analyze the thread locks to diagonalize the problems. To download (http://lockness.plugin.free.fr/archive/com.cr.lockness.Lockness_3.0.0.jar), put this jar to eclipse3.x/plugins dir and restart eclipse.

How to take a thread dump:

Sending "kill -3 signal to the JBOSS/TOMCAT process" will give you the whole thread dump. Ex: kill -3 #### -> process id.

After executing the above command, you can find thread dump in catalina.out for tomcat or server.log for jboss.

You've to trim the thread dump contents exactly from above log files, such that the dump file starts with "Full thread dump" and end with "VM Thread".

Also, if you have some timestamps added in thread dump, you can trim that using below cut command. For ex: say each line has some time stamps added like "2010-10-25 13:29:23 PDT", then to skip the first 3 columns. Use below command

cat threaddump.txt | cut -d " " -f4- > cut_file_threaddump.txt

The above command will skip first 3 columns and saves rest of the columns what we needed to cut_file_threaddump.txt.

Then from eclipse, create a new java project, create folder pointing to above create dump dir and opening this using "Lockness" thread dump analyser plugin will give you the analysis.

1 comment:

Sri said...

Thanks prakash, its really helpful.