Track down High CPU Thread with ps, top and the new JDK7
jcmd Tool In Weblogic :
Step1 : Login to the weblogic server
Find
out the java process which is running for weblogic with “ps command”
Eg : ps –ef | grep
java
you will see a java process with id 6439
Here the java process id is 6439
Step 2: To display
all the threads with this java process use the “ top” command as below
Eg: top -H –p 6439
Here we can see the thread ID 6474 is consuming the max cpu
in the thread list. Lets us convert the value to hexadecimal value
Use the following syntax to convert the value
Printf “%x \n” 6474
Hexavaule is : 194a
Set the environment for JDK 7
/domain/testdomain/bin/> . ./setDomain.sh
Start the jmcd by typing : jcmd
Now take the thread dump of the java process
jcmd 6439 help
Now open the thread dump and search for the hexadecimal
value of max threaded. You will see the status of the thread and code with is
causing the issue.
No comments:
Post a Comment