Monday, 6 January 2014

Generating java thread dump in Linux or Unix

If your server got hang, before restarting your server you can take the thread dump of the server for identifying the issue.
In Linux or Unix machine you can identify the running processes by below command
ps -ef
By this command you will get list of all the processes running. From those list, to filter the processes list which are of java processes use the below command
ps -ef | grep java
Identify the required process which you want to kill and provide the corresponding process in below command
Kill -3 java-process Id
This command will kill the corresponding process and generates the thread dump at the server location
If you want to get the thread dump without killing the process, below command generates the thread dump at provided location
jstack java-process Id > jstack.out

3 comments:

  1. Mp3 Manager Zortam Mp3 Media Studio is all-in-one Mp3 application suite. It has several modules such us Zortam Mp3 Auto Tagger, Mp3 Organizer, ID3 Tag Editor, Mp3 Player, Mp3 Normalizer, CD Ripper, Mp3 to Wav converter. With Zortam Mp3 Media Studio you can batch auto tag your Mp3 files using Zortam database. Batch auto tag process download Cover Art, Lyrics and other metadata and automatically tags your Mp3 files.

    ReplyDelete
  2. The future of automation testing tool is on the positive tool. As the demand of quality web application keeps on increasing, the tool like Selenium IDE is getting very popular all over the world. Thus, taking Selenium Training will help you to enter software testing industry.

    ReplyDelete